diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2011-04-19 03:26:49 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2011-04-19 03:26:49 +0000 |
commit | 9f318ba306fa33ba0e626d6d3dc0bc24291ee2f0 (patch) | |
tree | 1b96d697539e061c47f580ea8dffdeb61b3e7e83 /bootscripts | |
parent | 7a88173e383114e7a76b584f08e68ba5ecc3bc94 (diff) |
Add new /run mount point to top level directories. Mount a tmpfs on /run in
bootscripts. Add symlinks to use new /run tmpfs.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9510 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/ChangeLog | 4 | ||||
-rw-r--r-- | bootscripts/Makefile | 8 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/Makefile | 8 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/modules | 2 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/mountfs | 2 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/mountvirtfs (renamed from bootscripts/contrib/lsb-v3/init.d/mountkernfs) | 17 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/sysctl | 2 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/mountfs | 6 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/mountvirtfs (renamed from bootscripts/lfs/init.d/mountkernfs) | 15 |
9 files changed, 44 insertions, 20 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index bf7aec7a5..089c5345f 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2010-05-29 Bruce Dubbs <bdubbs@linuxfromscratch.org> + * lfs/init.d/mountvirtfs: Change name from mountkernfs to mountvirtfs. + Add mounting of /run filesystem. + 2010-05-29 Matt Burgess <matthew@linuxfromscratch.org> * lfs/init.d/udev: Only copy /lib/udev/devices/null, as Udev >= 155 copies devices from /lib/udev/devices to /dev itself. Udevd still needs /dev/null diff --git a/bootscripts/Makefile b/bootscripts/Makefile index 85bd722f5..54b8f6562 100644 --- a/bootscripts/Makefile +++ b/bootscripts/Makefile @@ -31,7 +31,7 @@ install: create-dirs create-service-dir install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/modules ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/ - install -m ${MODE} lfs/init.d/mountkernfs ${EXTDIR}/rc.d/init.d/ + install -m ${MODE} lfs/init.d/mountvirtfs ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/network ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/rc ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/ @@ -67,7 +67,7 @@ install: create-dirs create-service-dir ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc6.d/S90localnet ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot - ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs + ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs ln -sf ../init.d/consolelog ${EXTDIR}/rc.d/rcsysinit.d/S02consolelog ln -sf ../init.d/modules ${EXTDIR}/rc.d/rcsysinit.d/S05modules ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev @@ -104,7 +104,7 @@ minimal: create-dirs create-service-dir install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/ - install -m ${MODE} lfs/init.d/mountkernfs ${EXTDIR}/rc.d/init.d/ + install -m ${MODE} lfs/init.d/mountvirtfs ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/rc ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/ @@ -119,7 +119,7 @@ minimal: create-dirs create-service-dir ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot - ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs + ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcsysinit.d/S20swap ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs diff --git a/bootscripts/contrib/lsb-v3/Makefile b/bootscripts/contrib/lsb-v3/Makefile index d86c083cb..0d31fb60a 100644 --- a/bootscripts/contrib/lsb-v3/Makefile +++ b/bootscripts/contrib/lsb-v3/Makefile @@ -35,7 +35,7 @@ install: create-dirs create-service-dir create-boottemp-dir install -m ${MODE} init.d/localnet ${EXTDIR}/init.d/ install -m ${MODE} init.d/modules ${EXTDIR}/init.d/ install -m ${MODE} init.d/mountfs ${EXTDIR}/init.d/ - install -m ${MODE} init.d/mountkernfs ${EXTDIR}/init.d/ + install -m ${MODE} init.d/mountvirtfs ${EXTDIR}/init.d/ install -m ${MODE} init.d/network ${EXTDIR}/init.d/ install -m ${MODE} init.d/rc ${EXTDIR}/init.d/ install -m ${MODE} init.d/reboot ${EXTDIR}/init.d/ @@ -67,7 +67,7 @@ install: create-dirs create-service-dir create-boottemp-dir /usr/lib/lsb/install_initd ${EXTDIR}/init.d/localnet /usr/lib/lsb/install_initd ${EXTDIR}/init.d/modules /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountfs - /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountkernfs + /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountvirtfs /usr/lib/lsb/install_initd ${EXTDIR}/init.d/network /usr/lib/lsb/install_initd ${EXTDIR}/init.d/reboot /usr/lib/lsb/install_initd ${EXTDIR}/init.d/sendsignals @@ -85,7 +85,7 @@ minimal: create-dirs create-service-dir create-boottemp-dir install -m ${MODE} init.d/halt ${EXTDIR}/init.d/ install -m ${MODE} init.d/localnet ${EXTDIR}/init.d/ install -m ${MODE} init.d/mountfs ${EXTDIR}/init.d/ - install -m ${MODE} init.d/mountkernfs ${EXTDIR}/init.d/ + install -m ${MODE} init.d/mountvirtfs ${EXTDIR}/init.d/ install -m ${MODE} init.d/rc ${EXTDIR}/init.d/ install -m ${MODE} init.d/reboot ${EXTDIR}/init.d/ install -m ${MODE} init.d/sendsignals ${EXTDIR}/init.d/ @@ -103,7 +103,7 @@ minimal: create-dirs create-service-dir create-boottemp-dir /usr/lib/lsb/install_initd ${EXTDIR}/init.d/halt /usr/lib/lsb/install_initd ${EXTDIR}/init.d/localnet /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountfs - /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountkernfs + /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountvirtfs /usr/lib/lsb/install_initd ${EXTDIR}/init.d/reboot /usr/lib/lsb/install_initd ${EXTDIR}/init.d/sendsignals /usr/lib/lsb/install_initd ${EXTDIR}/init.d/setclock diff --git a/bootscripts/contrib/lsb-v3/init.d/modules b/bootscripts/contrib/lsb-v3/init.d/modules index b233cf46d..f97cb892d 100644 --- a/bootscripts/contrib/lsb-v3/init.d/modules +++ b/bootscripts/contrib/lsb-v3/init.d/modules @@ -3,7 +3,7 @@ ### BEGIN INIT INFO # Provides: modules -# Required-Start: mountkernfs sysctl +# Required-Start: mountvirts sysctl # Should-Start: # Required-Stop: # Should-Stop: diff --git a/bootscripts/contrib/lsb-v3/init.d/mountfs b/bootscripts/contrib/lsb-v3/init.d/mountfs index 2e03db582..5a375ec51 100644 --- a/bootscripts/contrib/lsb-v3/init.d/mountfs +++ b/bootscripts/contrib/lsb-v3/init.d/mountfs @@ -33,6 +33,7 @@ case "${1}" in mount -f / || failed=1 mount -f /proc || failed=1 mount -f /sys || failed=1 + mount -f /run || failed=1 (exit ${failed}) evaluate_retval standard @@ -40,6 +41,7 @@ case "${1}" in # their option list. _netdev denotes a network filesystem. message="Mounting remaining file systems..." mount -a -O no_netdev >/dev/null + ln -s /run/shm /dev/shm evaluate_retval standard ;; diff --git a/bootscripts/contrib/lsb-v3/init.d/mountkernfs b/bootscripts/contrib/lsb-v3/init.d/mountvirtfs index 7366f0bf1..6706da0a3 100644 --- a/bootscripts/contrib/lsb-v3/init.d/mountkernfs +++ b/bootscripts/contrib/lsb-v3/init.d/mountvirtfs @@ -1,16 +1,16 @@ #!/bin/sh -# Begin /etc/init.d/mountkernfs +# Begin /etc/init.d/mountvirtfs ### BEGIN INIT INFO -# Provides: mountkernfs +# Provides: mountvirtfs # Required-Start: # Should-Start: # Required-Stop: # Should-Stop: # Default-Start: S # Default-Stop: -# Short-Description: Mounts /sys and /proc virtual (kernel) filesystems. -# Description: Mounts /sys and /proc virtual (kernel) filesystems. +# Short-Description: Mounts /sys, /proc, and /run virtual (virtel) filesystems. +# Description: Mounts /sys, /proc, and run virtual (virtel) filesystems. # X-LFS-Provided-By: LFS ### END INIT INFO @@ -18,7 +18,7 @@ case "${1}" in start) - message="Mounting kernel-based file systems:" + message="Mounting virtel-based file systems:" if ! mountpoint /proc > /dev/null; then message="${message}${INFO} /proc${NORMAL}" @@ -30,6 +30,11 @@ case "${1}" in mount -n /sys || failed=1 fi + if ! mountpoint /run > /dev/null; then + message="${message}${INFO} /run${NORMAL}" + mount -n /run || failed=1 + fi + (exit ${failed}) evaluate_retval standard ;; @@ -40,4 +45,4 @@ case "${1}" in ;; esac -# End /etc/init.d/mountkernfs +# End /etc/init.d/mountvirtfs diff --git a/bootscripts/contrib/lsb-v3/init.d/sysctl b/bootscripts/contrib/lsb-v3/init.d/sysctl index 813467117..cccff126e 100644 --- a/bootscripts/contrib/lsb-v3/init.d/sysctl +++ b/bootscripts/contrib/lsb-v3/init.d/sysctl @@ -3,7 +3,7 @@ ### BEGIN INIT INFO # Provides: sysctl -# Required-Start: mountkernfs +# Required-Start: mountvirtfs # Should-Start: # Required-Stop: # Should-Stop: diff --git a/bootscripts/lfs/init.d/mountfs b/bootscripts/lfs/init.d/mountfs index 3d9262463..09d6f913c 100644 --- a/bootscripts/lfs/init.d/mountfs +++ b/bootscripts/lfs/init.d/mountfs @@ -29,6 +29,7 @@ case "${1}" in mount -f / || failed=1 mount -f /proc || failed=1 mount -f /sys || failed=1 + mount -f /run || failed=1 (exit ${failed}) evaluate_retval @@ -37,6 +38,11 @@ case "${1}" in boot_mesg "Mounting remaining file systems..." mount -a -O no_netdev >/dev/null evaluate_retval + + #Create a symlink for shared memory after /dev is mounted + boot_mesg "Redirect /dev/shm to /run/shm..." + ln -s /run/shm /dev/shm + evaluate_retval ;; stop) diff --git a/bootscripts/lfs/init.d/mountkernfs b/bootscripts/lfs/init.d/mountvirtfs index 10b165a5c..370f4e4b0 100644 --- a/bootscripts/lfs/init.d/mountkernfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -1,8 +1,8 @@ #!/bin/sh ######################################################################## -# Begin $rc_base/init.d/mountkernfs +# Begin $rc_base/init.d/mountvirtfs # -# Description : Mount proc and sysfs +# Description : Mount proc, sysfs, and run # # Authors : Gerard Beekmans - gerard@linuxfromscratch.org # @@ -17,7 +17,7 @@ case "${1}" in start) - boot_mesg -n "Mounting kernel-based file systems:" ${INFO} + boot_mesg -n "Mounting virtual file systems:" ${INFO} if ! mountpoint /proc >/dev/null; then boot_mesg -n " /proc" ${NORMAL} @@ -29,6 +29,13 @@ case "${1}" in mount -n /sys || failed=1 fi + if ! mountpoint /run >/dev/null; then + boot_mesg -n " /run" ${NORMAL} + mount -n /run || failed=1 + mkdir /run/var + mkdir /run/shm + fi + boot_mesg "" ${NORMAL} (exit ${failed}) @@ -41,4 +48,4 @@ case "${1}" in ;; esac -# End $rc_base/init.d/mountkernfs +# End $rc_base/init.d/mountvertfs |