From 04abf6c6b7ad0a09ac2b169ef1f52a71873a68e3 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Sun, 28 Mar 2021 23:41:35 +0200 Subject: [PATCH] New step to install cifs requirements incl. notes Add note on how to disable ipv6 --- seqs/debianrpi.sh | 68 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/seqs/debianrpi.sh b/seqs/debianrpi.sh index 832b1e6..6aa6b15 100755 --- a/seqs/debianrpi.sh +++ b/seqs/debianrpi.sh @@ -17,24 +17,17 @@ SDROOTPUUID= # Get script working directory # (when called from a different directory) WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )" +APTOPT= CONFIG=0 SCRIPT_NAME=$(basename -- $0) SCRIPT_NAME=${SCRIPT_NAME%%.*} CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg" CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example" -#step_config() { -# echo "Called once before executing steps." - ## e.g. to source a config file manually: - #. "$CONFIG_FILE" - ## or to use sequencer api with global config file: - #initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE" - ## or to use sequencer api with profile config file support: - #initSeqConfig -p "$SCRIPT_NAME" "$CONFIG_FILE_TEMPLATE" - #if [ $? -eq 0 ] ; then - # CONFIG=1 - #fi -#} +step_config() { + [ $QUIET -ne 0 ] && APTOPT="-y" + return 0 +} step_1_info() { echo "Download latest xz-compressed image [IMAGE FILE URL] [SD CARD DEVICE]" @@ -109,6 +102,10 @@ iface eth0 inet6 static address fd00::38/72 gateway fd00::1/64 +[I] Disable ipv6 + [etc/sysctl.conf] +net.ipv6.conf.eth0.disable_ipv6 = 1 + [I] Setup dns nameserver [etc/resolv.conf] nameserver 192.168.0.1 @@ -133,12 +130,17 @@ step_10() { fi exe apt update - exe apt full-upgrade - exe apt install $toolEssentialDeps + exe apt full-upgrade $APTOPT + exe apt install $toolEssentialDeps $APTOPT } -step_11_info() { echo "Setup locales to en_US.UTF-8"; } +step_11_info() { echo "Set timezone"; } step_11() { + exe dpkg-reconfigure tzdata +} + +step_12_info() { echo "Setup locales to en_US.UTF-8"; } +step_12() { local localUs="en_US.UTF-8" local localUsDefault="$localUs UTF-8" if [ ! -f "$localesConfigLoc" ] ; then @@ -154,9 +156,9 @@ step_11() { } localesConfigLoc="/etc/locale.gen" -step_13_info() { echo "Change hostname [HOSTNAME]"; } -step_13_alias() { ALIAS="hostname"; } -step_13() { +step_14_info() { echo "Change hostname [HOSTNAME]"; } +step_14_alias() { ALIAS="hostname"; } +step_14() { shift local localHostname=$1 endCheckEmpty localHostname "No hostname provided" @@ -170,6 +172,36 @@ step_13() { } hostsLoc="/etc/hosts" +step_16_info() { echo "Install cifs mounting requirements"; } +step_16_alias() { ALIAS="cifs"; } +step_16() { + exe apt install cifs-utils $APTOPT +} + +step_17_info() { echo "Cifs notes"; } +step_17() { + outColor green + cat <