From a9180c821297237d19e6cc98e733968945eec2c0 Mon Sep 17 00:00:00 2001 From: brent s Date: Thu, 4 May 2017 02:59:12 -0400 Subject: [PATCH] testing scripts --- aifclient.py | 13 +++++++++---- script-samples/post.sh | 3 +++ script-samples/pre.sh | 3 +++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 script-samples/post.sh create mode 100644 script-samples/pre.sh diff --git a/aifclient.py b/aifclient.py index 6f82440..b54eae5 100755 --- a/aifclient.py +++ b/aifclient.py @@ -325,10 +325,15 @@ class aif(object): for x in xmlobj.find('bootloader').attrib: aifdict['system']['bootloader'][x] = xmlobj.find('bootloader').attrib[x] # The script setup... - for x in xmlobj.find('scripts'): - scripttype = - if not aifdict['scripts'][scripttype]: - aifdict['scripts'][scripttype] = {} + # We do this later on. +# for x in xmlobj.find('scripts'): +# if x.attrib['bootstrap'].lower() in ('true', '1'): +# scripttype = 'pre' +# else: +# scripttype = 'post' +# if not aifdict['scripts'][scripttype]: +# aifdict['scripts'][scripttype] = {} +# aifdict['scripts'][scripttype][int(x.attrib['order'])] = {} return(aifdict) class archInstall(object): diff --git a/script-samples/post.sh b/script-samples/post.sh new file mode 100644 index 0000000..c7310c7 --- /dev/null +++ b/script-samples/post.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo 'This is another sample script. It would run after the install has completed.' diff --git a/script-samples/pre.sh b/script-samples/pre.sh new file mode 100644 index 0000000..26dd404 --- /dev/null +++ b/script-samples/pre.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo 'This is an example script. It currently does nothing. You can run anything here. It would run before disk partitioning.'