Add a new shutdown runlevel, Gentoo #224537.
Split halt.sh into halt, killprocs, romount and savecache services. The reboot runlevel is removed but mapped to shutdown. The halt script should be moved to the sysvinit package.
This commit is contained in:
@@ -10,18 +10,6 @@
|
||||
# FreeBSD-7 supports tmpfs now :)
|
||||
mount_svcdir()
|
||||
{
|
||||
local dotmp=false release=false retval=0
|
||||
if [ -e "${RC_SVCDIR}"/deptree ]; then
|
||||
dotmp=true
|
||||
if ! mount -t tmpfs none "${RC_LIBDIR}"/tmp 2>/dev/null; then
|
||||
mdconfig -a -t malloc -s 1m -u 1
|
||||
newfs /dev/md1
|
||||
mount /dev/md1 "${RC_LIBDIR}"/tmp
|
||||
release=true
|
||||
fi
|
||||
cp -p "${RC_SVCDIR}"/deptree "${RC_SVCDIR}"/depconfig \
|
||||
"${RC_SVCDIR}"/nettree "${RC_LIBDIR}"/tmp 2>/dev/null
|
||||
fi
|
||||
if ! fstabinfo --mount "${RC_SVCDIR}"; then
|
||||
if ! mount -t tmpfs -o rw,noexec,nosuid none "${RC_SVCDIR}" 2>/dev/null; then
|
||||
mdconfig -a -t malloc -s "${rc_svcsize:-1024}"k -u 0
|
||||
@@ -29,15 +17,6 @@ mount_svcdir()
|
||||
mount -o rw,noexec,nosuid /dev/md0 "${RC_SVCDIR}"
|
||||
fi
|
||||
fi
|
||||
retval=$?
|
||||
if ${dotmp}; then
|
||||
cp -p "${RC_LIBDIR}"/tmp/deptree "${RC_LIBDIR}"/tmp/depconfig \
|
||||
"${RC_LIBDIR}"/tmp/nettree "${RC_SVCDIR}" 2>/dev/null
|
||||
umount "${RC_LIBDIR}"/tmp
|
||||
${release} && mdconfig -d -u 1
|
||||
fi
|
||||
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
. "${RC_LIBDIR}"/sh/functions.sh
|
||||
|
Reference in New Issue
Block a user