mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-22 15:11:04 +01:00
Refactored to set_partition_paths function
This commit is contained in:
parent
67532d60cb
commit
871646bc64
@ -18,6 +18,12 @@ echo_partition_name(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_partition_paths(){
|
||||||
|
info "Setting partition paths..."
|
||||||
|
root_partition_path=$(echo_partition_name "2")
|
||||||
|
boot_partition_path=$(echo_partition_name "1")
|
||||||
|
}
|
||||||
|
|
||||||
# Routine to echo the full sd-card-path
|
# Routine to echo the full sd-card-path
|
||||||
set_device_path(){
|
set_device_path(){
|
||||||
info "Available devices:"
|
info "Available devices:"
|
||||||
|
@ -14,8 +14,7 @@ error
|
|||||||
|
|
||||||
root_mount_path="/mnt/raspbian"
|
root_mount_path="/mnt/raspbian"
|
||||||
boot_mount_path="/mnt/raspbian/boot"
|
boot_mount_path="/mnt/raspbian/boot"
|
||||||
root_partition_path=$(echo_partition_name "2")
|
set_partition_paths
|
||||||
boot_partition_path=$(echo_partition_name "1")
|
|
||||||
|
|
||||||
info "Mount partitions..."
|
info "Mount partitions..."
|
||||||
mount -o rw "$boot_partition_path" "$boot_mount_path" ||
|
mount -o rw "$boot_partition_path" "$boot_mount_path" ||
|
||||||
|
@ -157,8 +157,7 @@ root_mount_path="$working_folder""root/"
|
|||||||
mkdir -v "$boot_mount_path"
|
mkdir -v "$boot_mount_path"
|
||||||
mkdir -v "$root_mount_path"
|
mkdir -v "$root_mount_path"
|
||||||
|
|
||||||
boot_partition_path=$(echo_partition_name "1")
|
set_partition_paths
|
||||||
root_partition_path=$(echo_partition_name "2")
|
|
||||||
|
|
||||||
mount_partitions(){
|
mount_partitions(){
|
||||||
info "Mount boot and root partition..."
|
info "Mount boot and root partition..."
|
||||||
|
Loading…
Reference in New Issue
Block a user