diff --git a/scripts/image/base.sh b/scripts/image/base.sh index 5e81708..f579da9 100644 --- a/scripts/image/base.sh +++ b/scripts/image/base.sh @@ -10,11 +10,11 @@ source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh # @parameter $1 is device path # @parameter $2 is the partition number echo_partition_name(){ - if [ "${1:5:1}" != "s" ] + if [ "${device_path:5:1}" != "s" ] then - echo "$1""p""$2" + echo "$device_path""p""$2" else - echo "$1$2" + echo "$device_path$2" fi } diff --git a/scripts/image/chroot.sh b/scripts/image/chroot.sh index 2882925..9f3a149 100644 --- a/scripts/image/chroot.sh +++ b/scripts/image/chroot.sh @@ -14,8 +14,8 @@ error root_mount_path="/mnt/raspbian" boot_mount_path="/mnt/raspbian/boot" -root_partition_path=$(echo_partition_name $device_path "2") -boot_partition_path=$(echo_partition_name $device_path "1") +root_partition_path=$(echo_partition_name "2") +boot_partition_path=$(echo_partition_name "1") info "Mount partitions..." mount -o rw "$boot_partition_path" "$boot_mount_path" || diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index 1fb0751..ab4af0c 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -157,8 +157,8 @@ root_mount_path="$working_folder""root/" mkdir -v "$boot_mount_path" mkdir -v "$root_mount_path" -boot_partition_path=$(echo_partition_name $device_path "1") -root_partition_path=$(echo_partition_name $device_path "2") +boot_partition_path=$(echo_partition_name "1") +root_partition_path=$(echo_partition_name "2") mount_partitions(){ info "Mount boot and root partition..."