You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
707 B
27 lines
707 B
![]()
16 years ago
|
#!/bin/sh
|
||
![]()
15 years ago
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||
![]()
16 years ago
|
|
||
![]()
14 years ago
|
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||
![]()
13 years ago
|
. /lib/nfs-lib.sh
|
||
![]()
16 years ago
|
|
||
![]()
13 years ago
|
[ "$#" = 3 ] || exit 1
|
||
![]()
16 years ago
|
|
||
![]()
16 years ago
|
# root is in the form root=nfs[4]:[server:]path[:options], either from
|
||
|
# cmdline or dhcp root-path
|
||
![]()
16 years ago
|
netif="$1"
|
||
|
root="$2"
|
||
![]()
16 years ago
|
NEWROOT="$3"
|
||
![]()
16 years ago
|
|
||
![]()
13 years ago
|
nfs_to_var $root $netif
|
||
![]()
16 years ago
|
[ -z "$server" ] && die "Required parameter 'server' is missing"
|
||
![]()
16 years ago
|
|
||
![]()
13 years ago
|
mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || >/dev/root ; }
|
||
![]()
16 years ago
|
|
||
|
# inject new exit_if_exists
|
||
![]()
14 years ago
|
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/nfs.sh
|
||
![]()
16 years ago
|
# force udevsettle to break
|
||
![]()
14 years ago
|
> $hookdir/initqueue/work
|
||
![]()
16 years ago
|
|
||
![]()
13 years ago
|
need_shutdown
|