]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
cleanfs: repair /var/run symlink to /run if it not exist.
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 17 Jul 2014 14:03:08 +0000 (16:03 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 17 Jul 2014 14:03:08 +0000 (16:03 +0200)
config/rootfiles/core/80/filelists/files
src/initscripts/init.d/cleanfs

index 753c38d98dd846b3ec9e3b2d50c963fdaf91e6f2..822baa2de0f3f8ecf25bd731f30cea0e6239a75a 100644 (file)
@@ -1,6 +1,7 @@
 etc/system-release
 etc/issue
 etc/logrotate.conf
+etc/rc.d/init.d/cleanfs
 etc/rc.d/init.d/dhcrelay
 etc/rc.d/init.d/dnsmasq
 etc/rc.d/init.d/networking/red.up/30-ddns
index d526c35b2eeeb4eb8a3d7953c7d9c3594c457fc7..e8c8c8bb0869a0f646ec1050f8408d450703cbea 100644 (file)
@@ -71,6 +71,13 @@ create_files() {
 
 case "${1}" in
        start)
+               if [[ ! -L "/var/run" ]]; then
+                       boot_mesg "Repair /var/run symlink to /run..."
+                       mv -u /var/run/* /run/ 2>&1 > /dev/null
+                       rm -rf /var/run
+                       ln -s ../run /var/run
+               fi
+
                boot_mesg -n "Cleaning file systems:" ${INFO}
 
                boot_mesg -n " /tmp" ${NORMAL}