diff options
Diffstat (limited to 'testModule')
| -rwxr-xr-x | testModule/hooks/pre-pivot/mount-tmp.sh | 2 | ||||
| -rwxr-xr-x | testModule/scripts/prepare-disks | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/testModule/hooks/pre-pivot/mount-tmp.sh b/testModule/hooks/pre-pivot/mount-tmp.sh index 152c844e..3fa24cce 100755 --- a/testModule/hooks/pre-pivot/mount-tmp.sh +++ b/testModule/hooks/pre-pivot/mount-tmp.sh @@ -3,7 +3,7 @@ # the initqueue. If a valid partition is found (either GPT with the label # OPENSLX_TMP or MBR with the type 0x44) its path will be written to # /tmp/openslx.tmpdisk -OPENSLX_TMP_DISK_FLAG="/tmp/openslx.tmpdisk" +OPENSLX_TMP_DISK_FLAG="/tmp/openslx.disk.tmp" if [ ! -e "$OPENSLX_TMP_DISK_FLAG" ]; then warn "'$OPENSLX_TMP_DISK_FLAG' not found!" diff --git a/testModule/scripts/prepare-disks b/testModule/scripts/prepare-disks index 28113cc7..2e7dd673 100755 --- a/testModule/scripts/prepare-disks +++ b/testModule/scripts/prepare-disks @@ -3,7 +3,7 @@ # GLOBALS # -declare -rg FLAG="/tmp/openslx.disks" +declare -rg FLAG="/tmp/openslx.disk" declare -rg OPENSLX_SYS_MOUNT="/opt/openslx/system" # @@ -18,7 +18,7 @@ declare -rg OPENSLX_SYS_MOUNT="/opt/openslx/system" mount_sys_part() { if [ ! -b "$1" ]; then warn "'$1' is not a block device?" - echo "!block: $1" >> /tmp/openslx.disks.log + echo "!block: $1" >> /tmp/openslx.disk.log return 1 fi @@ -26,10 +26,9 @@ mount_sys_part() { mkdir -p ${OPENSLX_SYS_MOUNT} if ! mount -t auto "${OPENSLX_SYS_DEVICE}" "${OPENSLX_SYS_MOUNT}"; then warn "Mounting '${OPENSLX_SYS_DEVICE}' to '${OPENSLX_SYS_MOUNT}' failed." - echo "mount phail" >> /tmp/openslx.disks.log + echo "mount phail" >> /tmp/openslx.disk.log return 1 fi - echo "ZOMG" >> /tmp/openslx.disks.log return 0 } @@ -46,20 +45,20 @@ command -v warn >/dev/null || . /lib/dracut-lib.sh # let check the arguments if [ "$#" -ne 2 ]; then warn "'$0' need 2 arguments: '$0 [OPENSLX_SYS|OPENSLX_TMP] <dev_path>'" - echo "Not enough args!" >> /tmp/openslx.disks.log + echo "Not enough args!" >> /tmp/openslx.disk.log exit 1 fi # $1 sane? if [ "x$1" != "xOPENSLX_SYS" ] && [ "x$1" != "xOPENSLX_TMP" ]; then warn "First arg needs to be either 'OPENSLX_SYS' or 'OPENSLX_TMP'." warn "Given: $1" - echo "OPENSLX? $1" >> /tmp/openslx.disks.log + echo "OPENSLX? $1" >> /tmp/openslx.disk.log exit 1 fi # $2 sane? if [ ! -b "/dev/$2" ]; then warn "Second arg appears not to be a block device!" - echo "block? $2" >> /tmp/openslx.disks.log + echo "block? $2" >> /tmp/openslx.disk.log exit 1 fi @@ -72,7 +71,7 @@ INSTANCES="$(grep "$PART_TYPE" "$FLAG" | busybox wc -l)" if [ "$INSTANCES" -ge 1 ]; then # uhoh we are not alone! warn "'$0' already running for $PART_TYPE ... ignoring." - echo "already running for $PART_TYPE" >> /tmp/openslx.disks.log + echo "already running for $PART_TYPE" >> /tmp/openslx.disk.log exit 1 fi @@ -81,7 +80,7 @@ fi echo "$PART_TYPE.$$" >> "$FLAG" # if we are still here, then we can go on and process the partition -echo "Processing: $PART_TYPE -> $PART_DEV" >> /tmp/openslx.disks.log +echo "Processing: $PART_TYPE -> $PART_DEV" >> /tmp/openslx.disk.log if [ "$PART_TYPE" = "OPENSLX_TMP" ]; then # mark it for later mounting! |
