From e772aeae76f2ad704a834dc17df02dbc137a6573 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Thu, 15 Sep 2005 20:05:07 +0000 Subject: modified netcfg/network scripts -- you can list multiple entries in NET_PROFILES that use the same INTERFACE. They will be started one at a time, and the first successful one will be kept. --- netcfg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'netcfg') diff --git a/netcfg b/netcfg index 70dd342..4de5052 100755 --- a/netcfg +++ b/netcfg @@ -19,11 +19,14 @@ usage() { version echo - echo "usage: netcfg " + echo "usage: netcfg [options] " echo " netcfg --stop " echo " netcfg --menu [--timeout ]" echo " netcfg --stopall" echo + echo "options:" + echo " -c Don't reconfigure an interface if it's already up" + echo echo "Network profiles are stored in $PROFILE_DIR" echo } @@ -77,6 +80,8 @@ start_profile() # Read the profile . $PROFILE_DIR/$1 + [ "$CHECK" = "1" -a -f $STATE_DIR/$INTERFACE ] && return + # Shut down any profiles tied to this interface stop_profile $INTERFACE @@ -208,6 +213,7 @@ fi # Parse command line MODE="profile" +CHECK=0 PROFILE= IFACE= TIMEOUT= @@ -223,6 +229,7 @@ while [ $# -ne 0 ]; do --timeout) shift TIMEOUT=$1 ;; --*) MODE="usage" ;; + -c) CHECK=1 ;; -*) MODE="usage" ;; *) PROFILE=$1 ;; esac -- cgit v1.2.3