Commit 4696eda3 authored by Franco Fichtner's avatar Franco Fichtner

rc: awareness for crash dumps on /var MFS, closes #874

(cherry picked from commit 66f0288a)
parent bb54653a
......@@ -70,10 +70,6 @@ fi
# set keyboard map if needed
/etc/rc.d/syscons onestart
# set up and recover a crash dump before activating swap
/usr/local/etc/rc.crashdump
swapon -a
# set up config directory structure
mkdir -p /conf/backup
mkdir -p /conf/sshd
......@@ -129,30 +125,52 @@ if [ ${USE_MFS_TMPVAR} -ne 0 ]; then
ln -s /root/var/db/pkg /var/db/pkg
fi
if [ ! -d /root/var/crash ]; then
mkdir -p /root/var
mv /var/crash /root/var
ln -s /root/var/crash /var/crash
fi
mount -t tmpfs -o mode=01777 tmpfs /tmp
mount -t tmpfs tmpfs /var
mkdir -p /var/db
ln -s /root/var/db/pkg /var/db/pkg
mkdir -p /var
ln -s /root/var/crash /var/crash
echo "done."
elif [ -d /root/var/db/pkg ]; then
else
# User must have just disabled RAM disks,
# let's move these back into place.
mkdir -p /var/db
# reverse the recovery symlink before moving
# back the original database:
rm -f /var/db/pkg
mv /root/var/db/pkg /var/db/
if [ -d /root/var/db/pkg ]; then
mkdir -p /var/db
# reverse the recovery symlink before moving
# back the original database:
rm -f /var/db/pkg
mv /root/var/db/pkg /var/db/
fi
if [ -d /root/var/crash ]; then
mkdir -p /var
rm -f /var/crash
mv /root/var/crash /var/crash
fi
fi
# make some directories in /var
mkdir -p /var/run /var/log /var/etc /var/db/entropy /var/at/jobs \
/var/empty /var/tmp
/var/empty /var/tmp /var/crash
# work around the fact that shutdown(8) doesn't clean up this file
rm -f /var/run/nologin
# set up and recover a crash dump before activating swap
/usr/local/etc/rc.crashdump
swapon -a
# write /var/run/dmesg.boot
/etc/rc.d/dmesg onestart
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment