86b86eefd8f9bada8e2447479f6190955223231e
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 02-run
1 #!/bin/bash
2 # Filename:      /etc/grml/fai/config/scripts/GRMLBASE/02-run
3 # Purpose:       cleanup after initscripts postinst for /run
4 # Authors:       grml-team (grml.org)
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -u
10 set -e
11
12 [ -r /etc/grml/grml-live.conf ]  && . /etc/grml/grml-live.conf
13 [ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
14
15 # This is what initscripts would do if everything would be fine.
16 if [ -L "$target/run" ] ; then
17    rm -f "$target/run"
18    rm -f -r "$target/var/run"
19    rm -f -r "$target/var/lock"
20    mkdir "$target/run"
21    mkdir "$target/run/lock"
22    chmod 1777 "$target/run/lock"
23    ln -s -f /run "$target/var/run"
24    ln -s -f /run/lock "$target/var/lock"
25 fi
26
27 ## END OF FILE #################################################################
28 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3