mirror of
https://github.com/kevinveenbirkenbach/raspberry-pi-tools.git
synced 2024-11-22 10:01: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 "$USER" # | The username
|
||||||
echo "mmcblk1" # | The device
|
echo "mmcblk1" # | The device
|
||||||
echo "3" # | The raspberry pi number
|
echo "4" # | The raspberry pi number
|
||||||
echo "arch" # | The operation system
|
echo "retropie" # | The operation system
|
||||||
echo "n" # | Force image download
|
echo "n" # | Force image download
|
||||||
echo "y" # | Transfer image
|
echo "n" # | Transfer image
|
||||||
echo "n" # ├── Overwrite device before copying
|
#echo "n" # ├── Overwrite device before copying
|
||||||
echo "user_password" # | The user password
|
echo "user_password" # | The user password
|
||||||
echo "root_password" # | The root password
|
echo "root_password" # | The root password
|
||||||
echo "y" # | Copy wifi configurations to target system
|
echo "y" # | Copy wifi configurations to target system
|
||||||
|
22
sd_setup.sh
22
sd_setup.sh
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2010 # ls | grep allowed
|
# shellcheck disable=SC2010 # ls | grep allowed
|
||||||
# shellcheck disable=SC2143 # Suppress wrong grep -q warning
|
|
||||||
|
|
||||||
echo "Setupscript for Raspberry Pi SD's"
|
echo "Setupscript for Raspberry Pi SD's"
|
||||||
echo
|
echo
|
||||||
@ -56,12 +55,19 @@ echo "Select sd-card..."
|
|||||||
echo "List of actual mounted devices:"
|
echo "List of actual mounted devices:"
|
||||||
ls -lasi /dev/ | grep -E "sd|mm"
|
ls -lasi /dev/ | grep -E "sd|mm"
|
||||||
echo
|
echo
|
||||||
while [ ! -b "$sd_card_path" ]
|
echo "Please type in the name of the correct sd-card."
|
||||||
do
|
echo "/dev/:" && read -r device
|
||||||
echo "Please type in the name of the correct sd-card."
|
sd_card_path="/dev/$device"
|
||||||
echo "/dev/:" && read -r device
|
|
||||||
sd_card_path="/dev/$device"
|
if [ ! -b "$sd_card_path" ]
|
||||||
done
|
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
|
echo "Select which Raspberry Pi version should be used:" && read -r version
|
||||||
|
|
||||||
@ -251,7 +257,7 @@ if [ "$transfer_image" = "y" ]
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Start regular mounting procedure..."
|
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
|
then
|
||||||
echo "Everything allready mounted. Skipping..."
|
echo "Everything allready mounted. Skipping..."
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user