* Don't wait for CIFS "devices" (//share/path) to appear since they
won't. This speeds up booting from CIFS a lot. svn path=/nixos/branches/modular-nixos/; revision=16023
This commit is contained in:
parent
0f6d7c8862
commit
0b39f614e9
@ -223,15 +223,22 @@ for ((n = 0; n < ${#mountPoints[*]}; n++)); do
|
||||
# "device" should be taken relative to /mnt-root, not /. Assume
|
||||
# that every device that starts with / but doesn't start with /dev
|
||||
# is a bind mount.
|
||||
pseudoDevice=
|
||||
case $device in
|
||||
/dev/*)
|
||||
;;
|
||||
//*)
|
||||
# Don't touch SMB/CIFS paths.
|
||||
pseudoDevice=1
|
||||
;;
|
||||
/*)
|
||||
device=/mnt-root$device
|
||||
;;
|
||||
*)
|
||||
# Not an absolute path; assume that it's a pseudo-device
|
||||
# like an NFS path (e.g. "server:/path").
|
||||
pseudoDevice=1
|
||||
;;
|
||||
esac
|
||||
|
||||
# USB storage devices tend to appear with some delay. It would be
|
||||
@ -239,8 +246,8 @@ for ((n = 0; n < ${#mountPoints[*]}; n++)); do
|
||||
# alas... So just wait for a few seconds for the device to
|
||||
# appear. If it doesn't appear, try to mount it anyway (and
|
||||
# probably fail). This is a fallback for non-device "devices"
|
||||
# that we don't properly recognise (like NFS mounts).
|
||||
if ! test -e $device; then
|
||||
# that we don't properly recognise.
|
||||
if test -z "$pseudoDevice" -a ! -e $device; then
|
||||
echo -n "waiting for device $device to appear..."
|
||||
for ((try = 0; try < 10; try++)); do
|
||||
sleep 1
|
||||
|
Loading…
Reference in New Issue
Block a user