Changeset 2255 in MondoRescue for branches/2.2.9/mindi/rootfs/sbin/start-nfs


Ignore:
Timestamp:
Jul 5, 2009, 2:58:53 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Fix #336 by extending the previous feature to a double call (pre and post) on the boot loader line to be able to call cripts either before mondorestore and/or after its execution
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/rootfs/sbin/start-nfs

    r2254 r2255  
    1717ipgateway=`grep nfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    1818ipconf=""
    19 script=""
     19pre=""
     20post=""
    2021export nfsmount=`grep nfs-server-mount /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    2122export imgname=`grep iso-prefix /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     
    3536    echo $i | grep -qi prefix= && export imgname=`echo $i | cut -d= -f2`
    3637    echo $i | grep -qi nfspath= && export dirimg=`echo $i | cut -d= -f2`
    37     echo $i | grep -qi script= && script=`echo $i | cut -d= -f2`
     38    echo $i | grep -qi pre= && pre=`echo $i | cut -d= -f2`
     39    echo $i | grep -qi post= && post=`echo $i | cut -d= -f2`
    3840done
    3941
     
    7779    mount -o ro,loop -t iso9660 /tmp/isodir/$dirimg/${imgname}-1.iso /mnt/cdrom
    7880
    79     # Save the script on the NFS share locally
    80     if [ "`echo $script | grep -E '^/tmp/isodir'`" ]; then
    81         cp $script /tmp
    82         LogIt "Copying $script under /tmp"
     81    # Save the scripts on the NFS share locally
     82    if [ "`echo $pre | grep -E '^/tmp/isodir'`" ]; then
     83        cp $pre /tmp
     84        LogIt "Copying $pre under /tmp"
     85    fi
     86    if [ "`echo $post | grep -E '^/tmp/isodir'`" ]; then
     87        cp $post /tmp
     88        LogIt "Copying $post under /tmp"
    8389    fi
    8490fi
Note: See TracChangeset for help on using the changeset viewer.