New step to install cifs requirements incl. notes
Add note on how to disable ipv6
This commit is contained in:
@@ -17,24 +17,17 @@ SDROOTPUUID=
|
|||||||
# Get script working directory
|
# Get script working directory
|
||||||
# (when called from a different directory)
|
# (when called from a different directory)
|
||||||
WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
|
WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
|
||||||
|
APTOPT=
|
||||||
CONFIG=0
|
CONFIG=0
|
||||||
SCRIPT_NAME=$(basename -- $0)
|
SCRIPT_NAME=$(basename -- $0)
|
||||||
SCRIPT_NAME=${SCRIPT_NAME%%.*}
|
SCRIPT_NAME=${SCRIPT_NAME%%.*}
|
||||||
CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg"
|
CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg"
|
||||||
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
|
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
|
||||||
|
|
||||||
#step_config() {
|
step_config() {
|
||||||
# echo "Called once before executing steps."
|
[ $QUIET -ne 0 ] && APTOPT="-y"
|
||||||
## e.g. to source a config file manually:
|
return 0
|
||||||
#. "$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_1_info() {
|
step_1_info() {
|
||||||
echo "Download latest xz-compressed image [IMAGE FILE URL] [SD CARD DEVICE]"
|
echo "Download latest xz-compressed image [IMAGE FILE URL] [SD CARD DEVICE]"
|
||||||
@@ -109,6 +102,10 @@ iface eth0 inet6 static
|
|||||||
address fd00::38/72
|
address fd00::38/72
|
||||||
gateway fd00::1/64
|
gateway fd00::1/64
|
||||||
|
|
||||||
|
[I] Disable ipv6
|
||||||
|
[etc/sysctl.conf]
|
||||||
|
net.ipv6.conf.eth0.disable_ipv6 = 1
|
||||||
|
|
||||||
[I] Setup dns nameserver
|
[I] Setup dns nameserver
|
||||||
[etc/resolv.conf]
|
[etc/resolv.conf]
|
||||||
nameserver 192.168.0.1
|
nameserver 192.168.0.1
|
||||||
@@ -133,12 +130,17 @@ step_10() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
exe apt update
|
exe apt update
|
||||||
exe apt full-upgrade
|
exe apt full-upgrade $APTOPT
|
||||||
exe apt install $toolEssentialDeps
|
exe apt install $toolEssentialDeps $APTOPT
|
||||||
}
|
}
|
||||||
|
|
||||||
step_11_info() { echo "Setup locales to en_US.UTF-8"; }
|
step_11_info() { echo "Set timezone"; }
|
||||||
step_11() {
|
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 localUs="en_US.UTF-8"
|
||||||
local localUsDefault="$localUs UTF-8"
|
local localUsDefault="$localUs UTF-8"
|
||||||
if [ ! -f "$localesConfigLoc" ] ; then
|
if [ ! -f "$localesConfigLoc" ] ; then
|
||||||
@@ -154,9 +156,9 @@ step_11() {
|
|||||||
}
|
}
|
||||||
localesConfigLoc="/etc/locale.gen"
|
localesConfigLoc="/etc/locale.gen"
|
||||||
|
|
||||||
step_13_info() { echo "Change hostname [HOSTNAME]"; }
|
step_14_info() { echo "Change hostname [HOSTNAME]"; }
|
||||||
step_13_alias() { ALIAS="hostname"; }
|
step_14_alias() { ALIAS="hostname"; }
|
||||||
step_13() {
|
step_14() {
|
||||||
shift
|
shift
|
||||||
local localHostname=$1
|
local localHostname=$1
|
||||||
endCheckEmpty localHostname "No hostname provided"
|
endCheckEmpty localHostname "No hostname provided"
|
||||||
@@ -170,6 +172,36 @@ step_13() {
|
|||||||
}
|
}
|
||||||
hostsLoc="/etc/hosts"
|
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 <<CIFS_EOF
|
||||||
|
# Example fstab entry
|
||||||
|
[/etc/fstab]
|
||||||
|
//192.168.0.10/Qdownload /mnt/Qdownload cifs vers=1.0,credentials=/root/.smbpasswd,uid=username,gid=groupname,file_mode=0775,dir_mode=0775 0 0
|
||||||
|
|
||||||
|
# Mounting during boot may fail on Rpi4. This changes the entry to automount
|
||||||
|
(note "_netdev" and "comment=systemd.automount")
|
||||||
|
//192.168.0.10/Qdownload /mnt/Qdownload cifs _netdev,vers=2.0,credentials=/root/.smbpasswd,uid=username,gid=groupname,file_mode=0775,dir_mode=0775,comment=systemd.automount 0 0
|
||||||
|
|
||||||
|
## Alternatively this options were reported to work
|
||||||
|
auto,x-systemd.automount
|
||||||
|
|
||||||
|
# Example .smbpasswd
|
||||||
|
Don't forget to chown 600 this file.
|
||||||
|
[/root/.smbpasswd]
|
||||||
|
username=REMOTEUSER
|
||||||
|
password=REMOTEPASSWORD
|
||||||
|
|
||||||
|
CIFS_EOF
|
||||||
|
}
|
||||||
|
|
||||||
step_40_info() { echo "Boot from HD notes"; }
|
step_40_info() { echo "Boot from HD notes"; }
|
||||||
step_40_alias() { ALIAS="hdboot"; }
|
step_40_alias() { ALIAS="hdboot"; }
|
||||||
step_40() {
|
step_40() {
|
||||||
|
Reference in New Issue
Block a user