reopen 390367

partly, option parsing for this is there now, but it doesn't yet work.
One thing, I get
"command line parsing errors", and looking into it showed that a shift
was forgotten on hostname parsing, and the long option wasn't handled
by getopt.

Added these - see patch - remove the debug lines...

I am still not getting an installed system the same way as I get when
using -c to define the classes, but some errors - looking deeper into
it now...


Index: bin/fai
===================================================================
--- bin/fai     (revision 4193)
+++ bin/fai     (working copy)
@@ -27,6 +27,7 @@
#*********************************************************************

#set -xv # for full debugging
+debug=true

export 
PATH=/usr/local/sbin:/usr/local/bin:/usr/lib/fai:/bin:/sbin:/usr/bin:/usr/sbin:
# some variables
@@ -157,8 +158,13 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main routine

+[ X$debug == "Xtrue" ] && echo "before getopt"
+
# Parse commandline options
-TEMP=$(getopt -o u:Nhvc:C: --long new,help,verbose,class:,cfdir: -n
"$0" -- "$@")
+TEMP=$(getopt -o u:Nhvc:C: --long
hostname:,new,help,verbose,class:,cfdir: -n "$0" -- "$@")
+
+[ X$debug == "Xtrue" ] && echo "after getopt"
+
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"
@@ -197,6 +203,7 @@
       -u|--hostname)
           shift
           export newhostname=$1
+           shift
           ;;
        --)
            shift
@@ -204,6 +211,7 @@
            ;;
         *)
            echo "$0: command line parsing error ! $@"
+            [ X$debug == "Xtrue" ] && echo "problem with $1"
            exit 1
            ;;
    esac


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to