@@ -160,8 +160,6 @@ create_disk () {
|
|||||||
local PREFIX=$3
|
local PREFIX=$3
|
||||||
local NR_PARTITIONS=${4:-1}
|
local NR_PARTITIONS=${4:-1}
|
||||||
|
|
||||||
local MOUNT_TARGET=/mnt
|
|
||||||
local SGDISK="/usr/bin/sgdisk"
|
|
||||||
local PARTITION=1
|
local PARTITION=1
|
||||||
|
|
||||||
local cmd
|
local cmd
|
||||||
@@ -241,13 +239,11 @@ create_fs_structure () {
|
|||||||
|
|
||||||
printf "${BLUE}Prepare root filesystem structure ${GREEN}'subvol=%s'${NO_COLOR}\n" \
|
printf "${BLUE}Prepare root filesystem structure ${GREEN}'subvol=%s'${NO_COLOR}\n" \
|
||||||
"$SUBVOL"
|
"$SUBVOL"
|
||||||
cmd="mount_target /dev/disk/by-partlabel/${PREFIX}-${LABEL} $MOUNT_POINT btrfs $SUBVOL"
|
|
||||||
if [ $dryrun -eq 1 ]; then
|
if [ $dryrun -eq 1 ]; then
|
||||||
printf "${MAGENTA}Would run ${GREEN}'%s'${NO_COLOR}\n" "$cmd"
|
printf "${MAGENTA}Would mount target root at ${GREEN}'%s'${NO_COLOR}\n" "$SUBVOL"
|
||||||
else
|
else
|
||||||
printf "${BLUE} - Create base subdirs${NO_COLOR}\n"
|
printf "${MAGENTA} - mount target root at ${GREEN}'%s'${NO_COLOR}\n" "$SUBVOL"
|
||||||
printf "${MAGENTA}Run ${GREEN}'%s'${NO_COLOR}\n" "$cmd"
|
mount_target /dev/disk/by-partlabel/${PREFIX}-${LABEL} $MOUNT_POINT btrfs $SUBVOL
|
||||||
eval "$cmd"
|
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
die "Can't mount root filesystem ${PREFIX}-${LABEL}"
|
die "Can't mount root filesystem ${PREFIX}-${LABEL}"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user