LFS-6.0 print process

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Jul 8 20:53:08 PDT 2004

Bryan Kadzban wrote:
> for SCRIPT in $network_devices/ifconfig.$1/*
> do
>     # a bit of error checking
>     ${SCRIPT} $1 up
> done

Whoops -- that should be:

for FILE in $network_devices/ifconfig.$1/*
     SERVICE=${FILE##*/[0-9][0-9]}   # or however many digits

     # error checking

     $network_devices/services/${SERVICE} $1 up $FILE

Where the difference is, the first loop will run each of the files in
ifconfig.$1, and the second will run each of the files with the same
base name as the ones in ifconfig.$1, but which are stored in
.../services/ instead.  The second passes the filename storing the
variables' definitions.

More information about the lfs-dev mailing list