network: break udevsettle early
parent
5759574b26
commit
a52586e8ea
|
|
@ -145,6 +145,12 @@ if [ -n "${root%%block:*}" ]; then
|
|||
printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' $iscsi_lun >> /etc/udev/rules.d/99-iscsi-root.rules
|
||||
fi
|
||||
|
||||
# inject new exit_if_exists
|
||||
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > /initqueue/iscsi-settle.sh
|
||||
|
||||
# force udevsettle to break
|
||||
> /initqueue/work
|
||||
|
||||
iscsistart -i $iscsi_initiator -t $iscsi_target_name \
|
||||
-g $iscsi_target_group -a $iscsi_target_ip \
|
||||
-p $iscsi_target_port \
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ nbd-client $preopts "$nbdserver" "$nbdport" /dev/nbd0 $opts || exit 1
|
|||
# If we didn't get a root= on the command line, then we need to
|
||||
# add the udev rules for mounting the nbd0 device
|
||||
if [ ! -e /etc/udev/rules.d/99-mount.rules ]; then
|
||||
echo '[ -e /dev/nbd0 ] && { ln -s /dev/nbd0 /dev/root 2>/dev/null; rm "$job"; }' \
|
||||
>> /initqueue-settled/nbd.sh
|
||||
echo 'settle_exit_if_exists="--exit-if-exists=/dev/nbd0"; [ -e /dev/nbd0 ] && { ln -s /dev/nbd0 /dev/root 2>/dev/null; rm "$job"; }' \
|
||||
>> /initqueue/nbd.sh
|
||||
|
||||
echo '[ -e /dev/root ]' > /initqueue-finished/nbd.sh
|
||||
|
||||
|
|
@ -107,4 +107,6 @@ fi
|
|||
|
||||
# NBD doesn't emit uevents when it gets connected, so kick it
|
||||
echo change > /sys/block/nbd0/uevent
|
||||
# force udevsettle to break
|
||||
> /initqueue/work
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -155,3 +155,10 @@ else
|
|||
mount -t nfs -o$options${options:+,}nolock $server:$path $NEWROOT \
|
||||
&& { [ -e /dev/root ] || >/dev/root ; }
|
||||
fi
|
||||
|
||||
# inject new exit_if_exists
|
||||
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > /initqueue/nfs.sh
|
||||
# force udevsettle to break
|
||||
> /initqueue/work
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue