diff --git a/README.md b/README.md index b278f0e..ec78a15 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,14 @@ This repository contains some shell scripts to install Arch Linux for the Raspberry Pi on a SD-Card and to backup a SD-Card. ## Setup -### Guided +### SD-Card +#### Guided To install a Linux distribution manually on a SD card type in: ```bash bash ./sd_setup.sh ``` -### Piped +#### Piped To pase the configuration to the program use this syntax: ```bash ( @@ -21,6 +22,18 @@ To pase the configuration to the program use this syntax: echo "y" #Copy wifi configurations to target system )| sudo bash ./sd_setup.sh ``` + +### System +#### Arch +```bash + pacman-key --init + pacman-key --populate archlinuxarm +``` +#### Ubuntu\\Debian +```bash + sudo apt update + sudo apt upgrade +``` ## Backup To backup a SD card type in: diff --git a/sd_setup.sh b/sd_setup.sh index 012a21d..235fbe3 100644 --- a/sd_setup.sh +++ b/sd_setup.sh @@ -247,7 +247,8 @@ if [ -f "$origin_user_rsa_pub" ] target_authorized_keys_content=$(cat "$target_authorized_keys") echo "$target_authorized_keys contains the following: $target_authorized_keys_content" chown -vR 1000 "$target_user_ssh_folder_path" - chmod -vR 400 "$target_user_ssh_folder_path" + chmod -v 700 "$target_user_ssh_folder_path" + chmod -v 600 "$target_authorized_keys" else echo "The ssh key \"$origin_user_rsa_pub\" can't be copied to \"$target_authorized_keys\" because it doesn't exist." fi