summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-10-30 23:25:55 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-10-30 23:25:55 +0100
commit51ec6e240b567eb3befa94322f8b2bc83eafd6af (patch)
treebb38e74fa8a08f81670bd365b1b903e46e9afb36 /src
parent80015df854fad17fef1987d8bc8ec2f5902f7565 (diff)
support for loading the lib-archboot library + fixes in load_profile
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fifa.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/fifa.sh b/src/fifa.sh
index 28fe891..7d3f13e 100755
--- a/src/fifa.sh
+++ b/src/fifa.sh
@@ -41,13 +41,23 @@ die_error ()
load_profile()
{
+ [ -z "$1" ] && die_error "load_profile needs a profile argument"
#TODO: http support
echo "Loading profile $1 ..."
- profile=/home/arch/fifa/profile-"$1"
+ profile=/home/arch/fifa/profile-$1
[ -f "$profile" ] && source "$profile" || die_error "Something went wrong while sourcing profile $profile"
}
+load_library ()
+{
+ [ -z "$1" ] && die_error "load_library needs a library argument"
+ echo "Loading library $1 ..."
+ library=/arch/$1
+ source $library*.sh || die_error "Something went wrong while sourcing library $library*.sh"
+}
+
+
execute ()
{
[ -z "$1" -o -z "$2" ] && die_error "Use the execute function like this: execute <type> <name> with type=phase/worker"
@@ -73,6 +83,9 @@ echo "Welcome to $TITLE"
mount -o remount,rw / &>/dev/null
+load_library lib-archboot/setup
+load_library lib-archboot/quickinst
+
[ "$1" != base ] && load_profile base
load_profile $1