From 440e64fc28c4bb22782bc9eb2842c773707ab49a Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 20 Dec 2008 12:45:15 +0100 Subject: enhanced arg parsing + automatic procedure can read configs now --- src/core/procedures/automatic | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic index 0e47f7b..cdda847 100644 --- a/src/core/procedures/automatic +++ b/src/core/procedures/automatic @@ -3,12 +3,24 @@ # This is a procedure for automatic deployment/installation/configuration of systems. # TODO: document! (readme, notes about deployment profiles, examples, ...) # In theory, the only manual thing should maybe be configuring the runtime network -# TODO: implement profile reading # TODO: I don't know if you can do non-interactive dm_crypt stuff.. maybe by pulling luks keyfiles from svn/git/..? depend_module yaourt depend_procedure core base +var_OPTS_STRING="c:" +process_args () +{ + [ "$1" = '-c' ] + then + [ -z "$2" ] && die_error "You must specify a config" + source $2 || die_error "Could not source config $2" + else + usage + exit 5 + fi +} + phase_preparation=(\ configure \ intro \ -- cgit v1.2.3-54-g00ecf