--- /dev/null
+#!/bin/sh
+#
+# umountfs Turn off swap and unmount all local filesystems.
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# Ensure /proc is mounted
+test -r /proc/mounts || mount -t proc proc /proc
+
+echo "Deactivating swap..."
+swapoff -a
+
+# We leave /proc mounted, the umount of /dev/devpts seems to fail
+# quite frequently, the busybox umount apparently gives up at the
+# first failure, so it is necessary to go file system by file
+# system. It is necessary to go backward in the /proc list, because
+# later things may have been mounted on earlier mounts.
+unmount() {
+ local dev mp type opts
+ if read dev mp type opts
+ then
+ # recurse - unmount later items
+ unmount
+ # skip / and needed virtual filesystems
+ case "$mp" in
+ /|/dev|/proc|/sys) return 0;;
+ esac
+ # then unmount this, if possible, otherwise make
+ # it read-only
+ umount -f -r "$mp"
+ fi
+}
+
+echo "Unmounting local filesystems..."
+unmount </proc/mounts
+
+mount -o remount,ro /
--- /dev/null
+#!/bin/sh
+#
+# umountnfs.sh Unmount all network filesystems.
+#
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# Write a reboot record to /var/log/wtmp before unmounting
+halt -w
+
+# Ensure /proc is mounted
+test -r /proc/mounts || mount -t proc proc /proc
+
+echo "Unmounting remote filesystems..."
+
+#
+# Read the list of mounted file systems and -f umount the
+# known network file systems. -f says umount it even if
+# the server is unreachable. Do not attempt to umount
+# the root file system. Unmount in reverse order from
+# that given by /proc/mounts (otherwise it may not work).
+#
+unmount() {
+ local dev mp type opts
+ if read dev mp type opts
+ then
+ # recurse - unmount later items
+ unmount
+ # skip /, /proc and /dev
+ case "$mp" in
+ /) return 0;;
+ esac
+ # then unmount this, if nfs
+ case "$type" in
+ nfs|smbfs|ncpfs|cifs) umount -f -r "$mp";;
+ esac
+ fi
+}
+
+unmount </proc/mounts
-PR .= "-vuplus3"
+PR .= "-vuplus4"
BOOTUP = "bootup_3.1"
install -m 0755 ${WORKDIR}/make_mac_sector ${D}/usr/bin
install -m 0755 ${WORKDIR}/${BOOTUP} ${D}${sysconfdir}/init.d/bootup
ln -sf ../init.d/bootup ${D}${sysconfdir}/rcS.d/S05bootup
+
+ # rename umountnfs script because it should run before network is disabled
+ mv ${D}${sysconfdir}/rc0.d/S31umountnfs.sh ${D}${sysconfdir}/rc0.d/K31umountnfs.sh || /bin/true
+ mv ${D}${sysconfdir}/rc6.d/S31umountnfs.sh ${D}${sysconfdir}/rc6.d/K31umountnfs.sh || /bin/true
}
FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:"