netroot: Introduce detailed cmdline parsers
authorPhilippe Seewer <philippe.seewer@bfh.ch>
Tue, 16 Jun 2009 16:25:16 +0000 (18:25 +0200)
committerPhilippe Seewer <philippe.seewer@bfh.ch>
Wed, 17 Jun 2009 06:37:40 +0000 (08:37 +0200)
commit50e7ff76de1b9179565f011cd44ea669311e132d
treed72b10dcc95047b1a3ed80afb22736dadc1caf2b
parent9f10836d6304acb2f353db93e2b9003cd196ff0a
netroot: Introduce detailed cmdline parsers

This introduces detailed cmdline parsing, warning or aborting if the
cmdline does not contain arguments according to the spec.

Makeing sure the parsers don't just call getarg for netroot et al,
allows their reuse inside netroot to analyse dhcp root-path as well.
Hence we can get rid of the current netroot hooks. The hook itself stays
in order to add further modules which should run before netroot handlers
are called.

This has one drawback: nfsroot needs some more logic to handle nfs
specific data inside dhcp root-path.

The parsers have been writting according to current discussions about
cmdline arguments. This lead to the "discovery" that some test-cases
violate the spec. These tests have not been removed, but change to
"must fail".
16 files changed:
modules.d/40network/dhcp-fallback.sh
modules.d/40network/netroot
modules.d/95iscsi/install
modules.d/95iscsi/iscsi-netroot.sh [deleted file]
modules.d/95iscsi/iscsiroot
modules.d/95iscsi/parse-iscsiroot.sh
modules.d/95nbd/install
modules.d/95nbd/nbd-netroot.sh [deleted file]
modules.d/95nbd/nbdroot
modules.d/95nbd/parse-nbdroot.sh
modules.d/95nfs/install
modules.d/95nfs/nfs-netroot.sh [deleted file]
modules.d/95nfs/nfsroot
modules.d/95nfs/parse-nfsroot.sh
test/TEST-20-NFS/test.sh
test/TEST-40-NBD/test.sh