Default size changed to 8g.
This commit is contained in:
parent
743b49d6e2
commit
a311d3ee09
@ -47,8 +47,9 @@ help() {
|
|||||||
declare -A command=(
|
declare -A command=(
|
||||||
[h]="This help screen."
|
[h]="This help screen."
|
||||||
[l:]="Language default is en_US."
|
[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)"
|
[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
|
# Convert the keys of the associative array to a format usable by getopts
|
||||||
@ -76,6 +77,14 @@ while getopts "${args}" i ; do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
w)
|
||||||
|
if [[ -r "${OPTARG}" ]]; then
|
||||||
|
imageWifi="${OPTARG}"
|
||||||
|
else
|
||||||
|
echo "No netctl profile found at ${OPTARG}."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
@ -83,8 +92,11 @@ while getopts "${args}" i ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# make sure variables are set, or use defaults.
|
# make sure variables are set, or use defaults.
|
||||||
|
if [[ -n "${imageWifi}" ]]; then
|
||||||
|
export imageWifi
|
||||||
|
fi
|
||||||
export imageVersion="${imageVersion:-4}"
|
export imageVersion="${imageVersion:-4}"
|
||||||
export imageSize="${imageSize:-4G}"
|
export imageSize="${imageSize:-8G}"
|
||||||
export imageName="arcroft.img"
|
export imageName="arcroft.img"
|
||||||
export imageLanguage="${imageLanguage:-en_US.UTF-8}"
|
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
|
# Set the hostname
|
||||||
echo mycroft > /etc/hostname
|
echo mycroft > /etc/hostname
|
||||||
# Enable services
|
# Enable services
|
||||||
#systemctl enable
|
systemctl enable sshd
|
||||||
# Update fstab for Raspberry Pi 4.
|
# Update fstab for Raspberry Pi 4.
|
||||||
#[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab
|
#[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user