diff options
Diffstat (limited to 'testModule/scripts/prepare-disks')
| -rwxr-xr-x | testModule/scripts/prepare-disks | 17 |
1 files changed, 8 insertions, 9 deletions
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! |
