diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2010-01-24 20:43:01 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2010-01-24 20:43:01 +0000 |
commit | f78845c7a84d665a0bf326335957c90d03faf78c (patch) | |
tree | a508fa13080e5801ade1217eaa7f0df1a90a2ce6 /bootscripts | |
parent | 0152a7b7b97f6aad29a550006474e171d4be78d1 (diff) |
Check that /dev isn't already mounted in the udev bootscript. Fixes #2550.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9160 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/ChangeLog | 4 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/udev | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 4b9d7cd50..2a2a334e5 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2010-01-24 Matthew Burgess <matthew@linuxfromscratch.org> + * lfs/init.d/udev: Check to see if /dev is already mounted, as it may be if + under an initramfs environment. See ticket #2550. + 2009-08-14 Bryan Kadzban <bryan@linuxfromscratch.org> * lfs/init.d/udev_retry: Use "udevadm trigger --type=failed", which apparently replaced "--retry-failed" some time ago. "--retry-failed" is diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index 03846e6f3..18965d514 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -34,7 +34,9 @@ case "${1}" in # made or removed during this boot don't affect the next one. # The reason we don't write to mtab is because we don't ever # want /dev to be unavailable (such as by `umount -a'). - mount -n -t tmpfs tmpfs /dev -o mode=755 + if ! mountpoint /dev > /dev/null; then + mount -n -t tmpfs tmpfs /dev -o mode=755 + fi if [ ${?} != 0 ]; then echo_failure boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" ${FAILURE} |