mirror of
https://github.com/kevinveenbirkenbach/raspberry-pi-tools.git
synced 2024-11-25 19:31:04 +01:00
Verified mounting and solved bugs
This commit is contained in:
parent
ef14a671dc
commit
4b135b3a93
@ -21,11 +21,11 @@ To pase the configuration to the program use this syntax:
|
||||
(
|
||||
echo "$USER" # | The username
|
||||
echo "mmcblk1" # | The device
|
||||
echo "3" # | The raspberry pi number
|
||||
echo "arch" # | The operation system
|
||||
echo "4" # | The raspberry pi number
|
||||
echo "retropie" # | The operation system
|
||||
echo "n" # | Force image download
|
||||
echo "y" # | Transfer image
|
||||
echo "n" # ├── Overwrite device before copying
|
||||
echo "n" # | Transfer image
|
||||
#echo "n" # ├── Overwrite device before copying
|
||||
echo "user_password" # | The user password
|
||||
echo "root_password" # | The root password
|
||||
echo "y" # | Copy wifi configurations to target system
|
||||
|
16
sd_setup.sh
16
sd_setup.sh
@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2010 # ls | grep allowed
|
||||
# shellcheck disable=SC2143 # Suppress wrong grep -q warning
|
||||
|
||||
echo "Setupscript for Raspberry Pi SD's"
|
||||
echo
|
||||
@ -56,12 +55,19 @@ echo "Select sd-card..."
|
||||
echo "List of actual mounted devices:"
|
||||
ls -lasi /dev/ | grep -E "sd|mm"
|
||||
echo
|
||||
while [ ! -b "$sd_card_path" ]
|
||||
do
|
||||
echo "Please type in the name of the correct sd-card."
|
||||
echo "/dev/:" && read -r device
|
||||
sd_card_path="/dev/$device"
|
||||
done
|
||||
|
||||
if [ ! -b "$sd_card_path" ]
|
||||
then
|
||||
error "$sd_card_path is not valid device."
|
||||
fi
|
||||
|
||||
if mount | grep -q "$sd_card_path"
|
||||
then
|
||||
error "Device $sd_card_path is allready mounted. Umount with \"umount $sd_card_path*\"."
|
||||
fi
|
||||
|
||||
echo "Select which Raspberry Pi version should be used:" && read -r version
|
||||
|
||||
@ -251,7 +257,7 @@ if [ "$transfer_image" = "y" ]
|
||||
fi
|
||||
|
||||
echo "Start regular mounting procedure..."
|
||||
if [ "$(mount | grep -q "$boot_mount_path")" ] && [ "$(mount | grep -q "$root_mount_path")" ]
|
||||
if mount | grep -q "$boot_mount_path" && mount | grep -q "$root_mount_path"
|
||||
then
|
||||
echo "Everything allready mounted. Skipping..."
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user