diff options
author | Matthias Hentges <oe@hentges.net> | 2007-03-28 22:13:05 +0000 |
---|---|---|
committer | Matthias Hentges <oe@hentges.net> | 2007-03-28 22:13:05 +0000 |
commit | 2992d24c5ad56361a793281566b1ff7c76aa2836 (patch) | |
tree | 5c34807a2a39f0893cbfa9677a614aacc8fbe5c1 /packages/altboot/files/altboot-menu/Advanced/40-bootNFS | |
parent | 7e18fbe25e35f1801955ee150622761a07c8b8f1 (diff) |
altboot:
- Drop files/* and altboot_0.0.0.bb
- Add altboot_svn.bb
- Add README.txt explaining what the different versions do
Diffstat (limited to 'packages/altboot/files/altboot-menu/Advanced/40-bootNFS')
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/40-bootNFS | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS deleted file mode 100644 index 4f5c195be2..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ /dev/null @@ -1,110 +0,0 @@ -#! /bin/sh -# -# Copyright Matthias Hentges <devel@hentges.net> (c) 2006 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: 40-bootNFS -# Date: 14-Apr-06 - - -M_TITLE="Boot from NFS" - -test "$DISABLE_NFS_BOOT" = yes && exit 0 - -# This function is activated by init.altboot by calling this script with the "run" option -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - # Mount /proc, etc - init_rootfs - - nfs_host="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'|sed -n "s/\(.*\)\:\(.*\)/\1/p" `" - nfs_mounts="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'`" - nfs_mountpoints="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $2}'`" - - start_networking "$nfs_host" - - if test -z "$nfs_host" - then - mdie "${C_RED}No configured NFS drives found in /etc/fstab$C_RESET" - - fi - - - if test "` echo "$nfs_mountpoints" |wc -l | tr -d " "`" -gt 1 - then - echo -e "Please select your NFS root:\n" - - cnt=1 - for nfs_mount in $nfs_mountpoints - do - echo -e "\t[$cnt] $nfs_mount" - let cnt=$cnt+1 - done - - echo "" - - while test -z "$selection" - do - stty echo - echo -n "Boot NFS root: " - - if test "$AUTOBOOT" != "yes" - then - read junk < /dev/tty1 - else - if test -e /etc/.altboot-bootNFS-source.last - then - junk="`cat /etc/.altboot-bootNFS-source.last`" - test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" - else - read junk < /dev/tty1 - fi - fi - - - cnt=1 - for nfs_mount in $nfs_mounts - do - if test "$junk" = "$cnt" - then - selection="$nfs_mount" - echo "$junk" > /etc/.altboot-bootNFS-source.last - fi - let cnt=$cnt+1 - done - - done - else - test -z "$nfs_mounts" && die "No NFS mounts configured in /etc/fstab!" - selection="$nfs_mounts" - fi - - mkdir -p /media/nfsroot || mdie "mkdir -p /media/nfsroot failed!" - - echo -n "Mounting NFS root..." - - if ( mount | grep -q "/media/nfsroot" ) - then - echo "/media/nfsroot already used, tying to umount..." - umount /media/image - losetup -d /dev/loop0 - umount /media/nfsroot || die "umount failed!" - fi - - mount -t nfs "$selection" /media/nfsroot && echo ok || mdie "mount -t nfs "$selection" /media/nfsroot failed!" - - # Use configured resolv.conf in the pivoted rootfs - #echo -n "Copying resolv.conf..." - #cp /etc/resolv.conf /media/nfsroot/etc && echo ok || echo "FAILED" - - check_target "/media/nfsroot" bootNFS - -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - |