Merge remote-tracking branch 'origin/github/pr/145'
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 02-run
1 #!/bin/bash
2 # Filename:      ${GRML_FAI_CONFIG}/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 # This is what initscripts would do if everything would be fine.
13 if [ -L "$target/run" ] ; then
14    rm -f "$target/run"
15    rm -f -r "$target/var/run"
16    rm -f -r "$target/var/lock"
17    mkdir "$target/run"
18    mkdir "$target/run/lock"
19    chmod 1777 "$target/run/lock"
20    ln -s -f /run "$target/var/run"
21    ln -s -f /run/lock "$target/var/lock"
22 fi
23
24 ## END OF FILE #################################################################
25 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2