From d6bb5a2d18a56d50738522225459ee57dbc404c3 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Thu, 21 May 2020 20:01:32 +0200 Subject: [PATCH] Optimized upodate process --- README.md | 2 +- scripts/image/setup.sh | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 85e5d30..3e605e4 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ To pase the configuration to the program use this syntax: #echo "n" # ├── If arch: Should a encrypted setup be used? (y/n) echo "n" # | Should the image download be forced?(y/n) echo "n" # | Should the image be transfered to $device_path?(y/n) - echo "n" # ├── Overwrite device before copying? (y/n) + #echo "n" # ├── Overwrite device before copying? (y/n) echo "n" # | Should the password be changed?(y/N) #echo "test12345" # ├── The user password_1 #echo "test12345" # ├── The user password_2 diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index 203bea5..5f22062 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -342,7 +342,7 @@ if [ "$change_password" == "y" ] echo '$password_1' echo '$password_1' ) | passwd" - ) | chroot "$root_mount_path" /bin/bash || error "Password change failed." + ) | chroot "$root_mount_path" /bin/bash || error else error "Passwords didn't match." fi @@ -354,20 +354,22 @@ question "Should the hostname be changed?(y/N)" && read -r change_hostname if [ "$change_hostname" == "y" ] then question "Type in the hostname:" && read -r hostname; - echo "$hostname" > "$root_mount_path""etc/hostname" || error "Changing hostname failed." + echo "$hostname" > "$root_mount_path""etc/hostname" || error else info "Skipped hostname change..." fi -question "Should the image system be updated?(y/N)" && read -r update_system +question "Should the system be updated?(y/N)" && read -r update_system if [ "$update_system" == "y" ] then + info "Updating system..." && ( echo "yes | pacman-key --init" echo "yes | pacman-key --populate archlinuxarm" echo "yes | pacman -Syyu" - ) | chroot "$root_mount_path" /bin/bash || error "Password change failed." + ) | chroot "$root_mount_path" /bin/bash || error fi + # question "Do you want to copy all Wifi passwords to the device?(y/n)" && read -r copy_wifi # if [ "$copy_wifi" = "y" ] # then @@ -376,8 +378,5 @@ fi # rsync -av "$origin_wifi_config_path" "$target_wifi_config_path" # fi -info "The first level folder structure on $root_mount_path is:" && tree -laL 1 "$root_mount_path" -info "The first level folder structure on $boot_mount_path is:" && tree -laL 1 "$boot_mount_path" - destructor success "Setup successfull :)" && exit 0