lfs-execline-scripts

Repository for execline scripts used in my linux-from-scratch builds
Log | Files | Refs

sdhcp (467B)


      1 #!/usr/bin/execlineb -S1
      2 # Use execlineb -WS1 for testing/debugging (errors out on bad syntax)
      3 
      4 envfile /etc/svc.d/default/network.conf
      5 
      6 case -N -- $1
      7 {
      8 	# start service
      9 	"-s" {
     10 		importas -S DEV1
     11 		importas -S SDHCP_ARGS
     12 		background { printf "Getting DHCP Address on %s...\n" "$DEV1" }
     13 		foreground { sdhcp $SDHCP_ARGS -ef $DEV1 }
     14 	}
     15 	# kill service
     16 	"-k" {
     17 		# svc -k network
     18 		exit 0
     19 	}
     20 } # default case:
     21 foreground { /bin/printf "usage: %s -s|-k\n" "$0" } exit 1