]> git.pld-linux.org Git - projects/geninitrd.git/blobdiff - mod-nfs.sh
Don't run ldd on dynamic linker
[projects/geninitrd.git] / mod-nfs.sh
index e5176ca9d3e12de6d851ff8cf137a7ac7bd3b8ea..7e197afa57554bc3fa0afa002c7fe77cfd0d06cc 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/sh
-#
+NFS_RCSID='$Revision$ $Date::                            $'
+
 # geninitrd mod: nfs
 
 # if we should init NFS at boot
@@ -49,6 +50,10 @@ find_modules_nfs() {
 # generate initrd fragment
 # @access      public
 initrd_gen_nfs() {
+       if ! is_yes "$have_nfs"; then
+               return
+       fi
+
        # use root=/dev/ram0 init=/linuxrc when starting kernel or you will
        # have problems like init(XX) being child process of swapper(1).
        debug "Adding rootfs on NFS support to initrd (dhcp)"
@@ -63,7 +68,6 @@ initrd_gen_nfs() {
                cd /newroot
                pivot_root . initrd
                [ -x /sbin/chroot ] && exec /sbin/chroot . /sbin/init -i < dev/console > dev/console 2>&1
-               exec /usr/sbin/chroot . /sbin/init -i < dev/console > dev/console 2>&1
        EOF
 
        cat <<-'EOF' > "$DESTDIR/bin/setdhcp"
@@ -78,6 +82,10 @@ initrd_gen_nfs() {
                        done
                fi
 
+               if [ -n "$hostname" ]; then
+                       hostname $hostname
+               fi
+
                for o in $CMDLINE; do
                        case $o in
                        nfsroot=*)
This page took 0.030056 seconds and 4 git commands to generate.