From 0478edcbb85b9a6df35050485177c1f670edc50a Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Fri, 31 Jan 2020 23:33:23 +0100 Subject: [PATCH] Mount device Signed-off-by: Ralf Zerres --- usr/bin/arch-create-system | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr/bin/arch-create-system b/usr/bin/arch-create-system index 3f70115..813836e 100755 --- a/usr/bin/arch-create-system +++ b/usr/bin/arch-create-system @@ -237,12 +237,12 @@ create_fs_structure () { local cmd - printf "${BLUE}Prepare root filesystem structure ${GREEN}'subvol=%s'${NO_COLOR}\n" \ + printf "${BLUE}Prepare root filesystem structure with subvol=${GREEN}'%s'${NO_COLOR}\n" \ "$SUBVOL" if [ $dryrun -eq 1 ]; then printf "${MAGENTA}Would mount target root at ${GREEN}'%s'${NO_COLOR}\n" "$SUBVOL" else - printf "${MAGENTA} - mount target root at ${GREEN}'%s'${NO_COLOR}\n" "$SUBVOL" + printf "${BLUE} - mount target root" mount_target /dev/disk/by-partlabel/${PREFIX}-${LABEL} $MOUNT_POINT btrfs $SUBVOL if [ $? -gt 0 ]; then die "Can't mount root filesystem ${PREFIX}-${LABEL}" @@ -677,6 +677,12 @@ mount_target () { local cmd + if [ ! -h $DEV_NAME ]; then + printf "${RED}Error: ${NO_COLOR}Can't access given device ${GREEN}'%s'{NO_COLOR}\n" \ + "$DEV_NAME" + return 1 + fi + case $FS_TYPE in "btrfs") if [ -h $DEV_NAME ]; then