From a311d3ee0974fa2c2fc50b8b0a7b988e4eb143ad Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 27 Dec 2020 10:56:28 -0500 Subject: [PATCH] Default size changed to 8g. --- arcroft/build-arcroft.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/arcroft/build-arcroft.sh b/arcroft/build-arcroft.sh index b88094a..5c63a92 100755 --- a/arcroft/build-arcroft.sh +++ b/arcroft/build-arcroft.sh @@ -47,8 +47,9 @@ help() { declare -A command=( [h]="This help screen." [l:]="Language default is en_US." - [s:]="image size in GB, default is 4." + [s:]="image size in GB, default is 8." [v:]="Version of the Raspberry Pi for which you are building. (3|4 default)" + [w:]="Full path to netctl profile you want to use, usually located in /etc/netctl." ) # Convert the keys of the associative array to a format usable by getopts @@ -76,6 +77,14 @@ while getopts "${args}" i ; do exit 1 fi ;; + w) + if [[ -r "${OPTARG}" ]]; then + imageWifi="${OPTARG}" + else + echo "No netctl profile found at ${OPTARG}." + exit 1 + fi + ;; *) exit 1 ;; @@ -83,8 +92,11 @@ while getopts "${args}" i ; do done # make sure variables are set, or use defaults. +if [[ -n "${imageWifi}" ]]; then + export imageWifi +fi export imageVersion="${imageVersion:-4}" -export imageSize="${imageSize:-4G}" +export imageSize="${imageSize:-8G}" export imageName="arcroft.img" export imageLanguage="${imageLanguage:-en_US.UTF-8}" @@ -171,7 +183,7 @@ sed 's/^# %wheel ALL=(ALL) ALL$/%wheel ALL=(ALL) ALL/' /etc/sudoers.d/wheel # Set the hostname echo mycroft > /etc/hostname # Enable services -#systemctl enable +systemctl enable sshd # Update fstab for Raspberry Pi 4. #[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab EOF