Steps for essential deps and setup locales
This commit is contained in:
@@ -5,6 +5,8 @@ toolDownSite="https://raspi.debian.net/tested-images"
|
||||
toolDownUrl=
|
||||
toolDownFile=
|
||||
|
||||
toolEssentialDeps="vim bash-completion man-db locales wget"
|
||||
|
||||
SDDEV=
|
||||
SDBOOT=
|
||||
SDBOOTPUUID=
|
||||
@@ -99,26 +101,20 @@ step_3() {
|
||||
cat <<PREPARE_EOF
|
||||
[I] Setup static IP
|
||||
[etc/network/interfaces.d/eth0]
|
||||
|
||||
#iface eth0 inet dhcp
|
||||
|
||||
iface eth0 inet static
|
||||
address 192.168.23.38/24
|
||||
gateway 192.168.23.1
|
||||
dns-nameserver 192.168.23.20
|
||||
dns-search lan
|
||||
address 192.168.0.38/24
|
||||
gateway 192.168.0.1
|
||||
|
||||
iface eth0 inet6 static
|
||||
address fd23::38/72
|
||||
gateway fd23::cece:1eff:fea5:433d/64
|
||||
dns-nameserver fd23::20/72
|
||||
dns-search lan
|
||||
address fd00::38/72
|
||||
gateway fd00::1/64
|
||||
|
||||
[I] Setup dns nameserver
|
||||
[etc/resolv.conf]
|
||||
|
||||
nameserver 192.168.23.20
|
||||
nameserver fd23::20
|
||||
nameserver 192.168.0.1
|
||||
nameserver fd00::1
|
||||
|
||||
[I] Setup root ssh access
|
||||
[etc/ssh/sshd_config]
|
||||
@@ -133,11 +129,34 @@ PREPARE_EOF
|
||||
step_10_info() { echo "Essential debian setup"; }
|
||||
step_10_alias() { ALIAS="setup"; }
|
||||
step_10() {
|
||||
if [[ "$(uname)" =~ .*Rasp.* ]] ; then
|
||||
echo Raspi
|
||||
if [ -z "$(ls /etc/default | grep raspi)" ] ; then
|
||||
echoerr " [E] Not on a Raspberry pi"
|
||||
return -1
|
||||
fi
|
||||
|
||||
exe apt update
|
||||
exe apt full-upgrade
|
||||
exe apt install $toolEssentialDeps
|
||||
}
|
||||
|
||||
step_11_info() { echo "Setup locales to en_US.UTF-8"; }
|
||||
step_11() {
|
||||
local localUs="en_US.UTF-8"
|
||||
local localUsDefault"$localUs UTF-8"
|
||||
if [ ! -f "$localesConfigLoc" ] ; then
|
||||
echoerr " [E] Install packages locales first"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
exe sed -i "s/#[[:space:]]*\($localUsDefault\)/\1/" "$localesConfigLoc"
|
||||
endReturn -o $? "Changing locales failed"
|
||||
exe locale-gen
|
||||
exe update-locale LANG=$localUs
|
||||
echoseq " [I] Logout and login for changes to be active"
|
||||
}
|
||||
localesConfigLoc="/etc/locale.gen"
|
||||
|
||||
|
||||
read_sd_dev() {
|
||||
local partExt=""
|
||||
if [ ! -z "$1" ] ; then
|
||||
|
Reference in New Issue
Block a user