X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F02-run;fp=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F02-run;h=86b86eefd8f9bada8e2447479f6190955223231e;hb=e1b5d40521f8524d1de283228981d727a889647d;hp=0000000000000000000000000000000000000000;hpb=cb537a8079da9d9a75b049f2e2c6c7f87a905aa1;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/02-run b/etc/grml/fai/config/scripts/GRMLBASE/02-run new file mode 100755 index 0000000..86b86ee --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/02-run @@ -0,0 +1,28 @@ +#!/bin/bash +# Filename: /etc/grml/fai/config/scripts/GRMLBASE/02-run +# Purpose: cleanup after initscripts postinst for /run +# Authors: grml-team (grml.org) +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +set -u +set -e + +[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf +[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local + +# This is what initscripts would do if everything would be fine. +if [ -L "$target/run" ] ; then + rm -f "$target/run" + rm -f -r "$target/var/run" + rm -f -r "$target/var/lock" + mkdir "$target/run" + mkdir "$target/run/lock" + chmod 1777 "$target/run/lock" + ln -s -f /run "$target/var/run" + ln -s -f /run/lock "$target/var/lock" +fi + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3