diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 10 | ||||
-rw-r--r-- | src/core/libs/lib-misc.sh | 13 | ||||
-rw-r--r-- | src/core/libs/lib-software.sh | 4 | ||||
-rw-r--r-- | src/core/libs/lib-ui.sh | 4 | ||||
-rw-r--r-- | src/core/procedures/base | 2 |
5 files changed, 20 insertions, 13 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 5638f84..6bfa823 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -22,11 +22,11 @@ modprobe aes-i586 || show_warning modprobe 'Could not modprobe aes-i586. no supp -TMP_DEV_MAP=/home/arch/aif/runtime/dev.map -TMP_FSTAB=/home/arch/aif/runtime/.fstab -TMP_PARTITIONS=/home/arch/aif/runtime/.partitions -TMP_FILESYSTEMS=/home/arch/aif/runtime/.filesystems # Only used internally by this library. Do not even think about using this as interface to this library. it won't work -TMP_BLOCKDEVICES=/home/arch/aif/runtime/.blockdata +TMP_DEV_MAP=$RUNTIME_DIR/dev.map +TMP_FSTAB=$RUNTIME_DIR/.fstab +TMP_PARTITIONS=$RUNTIME_DIR/.partitions +TMP_FILESYSTEMS=$RUNTIME_DIR/.filesystems # Only used internally by this library. Do not even think about using this as interface to this library. it won't work +TMP_BLOCKDEVICES=$RUNTIME_DIR/.blockdata diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh index fd2ebb8..29e4c2e 100644 --- a/src/core/libs/lib-misc.sh +++ b/src/core/libs/lib-misc.sh @@ -14,7 +14,7 @@ run_background () debug "run_background called. identifier: $1, command: $2, logfile: $3" ( \ - touch /home/arch/aif/runtime/$1-running + touch $RUNTIME_DIR/$1-running debug "run_background starting $1: $2 >>$3 2>&1" [ -f $3 ] && echo -e "\n\n\n" >>$3 echo "STARTING $1 . Executing $2 >>$3 2>&1\n" >> $3; @@ -23,7 +23,7 @@ run_background () read $var_exit <<< $? #TODO: bash complains about 'not a valid identifier' debug "run_background done with $1: exitcode (\$$1_exitcode): "${!var_exit}" .Logfile $3" #TODO ${!var_exit} doesn't show anything --> maybe fixed now echo >> $3 - rm -f /home/arch/aif/runtime/$1-running + rm -f $RUNTIME_DIR/$1-running ) & sleep 2 @@ -36,7 +36,7 @@ wait_for () { [ -z "$1" ] && die_error "wait_for needs an identifier to known on which command to wait!" - while [ -f /home/arch/aif/runtime/$1-running ] + while [ -f $RUNTIME_DIR/$1-running ] do #TODO: follow_progress dialog mode = nonblocking (so check and sleep is good), cli mode (tail -f )= blocking? (so check is probably not needed as it will be done) sleep 1 @@ -60,3 +60,10 @@ check_is_in () done return 1 } + + +# cleans up file in the runtime directory who can be deleted +cleanup_runtime () +{ + rm -rf $RUNTIME_DIR/.dia* &>/dev/null +}
\ No newline at end of file diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh index 1785e85..af26137 100644 --- a/src/core/libs/lib-software.sh +++ b/src/core/libs/lib-software.sh @@ -1,7 +1,7 @@ #!/bin/sh -TMP_MKINITCPIO_LOG=/home/arch/aif/runtime/mkinitcpio.log -TMP_PACMAN_LOG=/home/arch/aif/runtime/pacman.log +TMP_MKINITCPIO_LOG=$RUNTIME_DIR/mkinitcpio.log +TMP_PACMAN_LOG=$RUNTIME_DIR/pacman.log # run_mkinitcpio() taken from setup. adapted a lot # runs mkinitcpio on the target system, displays output diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index bb7511e..3f64ee6 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -6,9 +6,9 @@ # Taken from setup. we store dialog output in a file. TODO: can't we do this with variables? ASKDEV -ANSWER="/home/arch/aif/runtime/.dialog-answer" +ANSWER=$RUNTIME_DIR/.dialog-answer DIA_MENU_TEXT="Use the UP and DOWN arrows to navigate menus. Use TAB to switch between buttons and ENTER to select." -DIA_SUCCESSIVE_ITEMS="/home/arch/aif/runtime/.dia-successive-items" +DIA_SUCCESSIVE_ITEMS=$RUNTIME_DIR/.dia-successive-items ### Functions that your code can use. Cli/dialog mode is fully transparant. This library takes care of it ### diff --git a/src/core/procedures/base b/src/core/procedures/base index 374f5ff..3797e0a 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -3,7 +3,7 @@ var_DEFAULTFS="/boot:32:ext2:+ swap:256:swap /:7500:ext3 /home:*:ext3" var_TARGET_DIR="/mnt" # When overriding this, do _not_ add a trailing /. It's not needed and maybe you could even break something var_RUNTIME_PACKAGES= -var_PKG_FILE=/home/arch/aif/runtime/package-list +var_PKG_FILE=$RUNTIME_DIR/package-list var_UI_TYPE="cli" # set to cli or dia for dialog ###### Phases ( can be overridden by more specific procedures) ###### |