mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-28 16:58:03 +01:00
commit
c8feef9063
2 changed files with 27 additions and 0 deletions
|
@ -294,6 +294,15 @@ echo "[Login]
|
|||
HandleLidSwitch=ignore
|
||||
HandleLidSwitchDocked=ignore" | tee /etc/systemd/logind.conf.d/nosuspend.conf
|
||||
|
||||
# check if /etc/hosts already has debian entry
|
||||
# prevent "unable to resolve host debian" error
|
||||
isDebianInHosts=$(grep -c "debian" /etc/hosts)
|
||||
if [ ${isDebianInHosts} -eq 0 ]; then
|
||||
echo "# Adding debian to /etc/hosts"
|
||||
echo "127.0.1.1 debian" | tee -a /etc/hosts > /dev/null
|
||||
systemctl restart networking
|
||||
fi
|
||||
|
||||
# FIXING LOCALES
|
||||
# https://github.com/rootzoll/raspiblitz/issues/138
|
||||
# https://daker.me/2014/10/how-to-fix-perl-warning-setting-locale-failed-in-raspbian.html
|
||||
|
|
18
ci/packer.sh
18
ci/packer.sh
|
@ -26,6 +26,14 @@ echo "Results will be stored in:"
|
|||
echo $BUILDFOLDER
|
||||
echo "Start this script in the root of an writable 128GB NTFS formatted USB drive."
|
||||
|
||||
# check if internet is available
|
||||
if ping -c 1 "1.1.1.1" &> /dev/null; then
|
||||
echo "# checking internet"
|
||||
else
|
||||
echo "error='script needs internet connection to run'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get parameters
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
|
||||
|
@ -90,6 +98,13 @@ cd raspiblitz
|
|||
|
||||
# checkout the desired branch
|
||||
git checkout $BRANCH
|
||||
if [ $? -gt 0 ]; then
|
||||
cd ..
|
||||
rm -rf raspiblitz 2>/dev/null
|
||||
echo "# BRANCH: ${BRANCH}"
|
||||
echo "error='git checkout BRANCH failed'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check commit hash if set
|
||||
if [ ${#COMMITHASH} -gt 0 ]; then
|
||||
|
@ -98,6 +113,8 @@ if [ ${#COMMITHASH} -gt 0 ]; then
|
|||
echo "# actual(${actualCOMMITHASH}) ?= wanted(${COMMITHASH})"
|
||||
matches=$(echo "${actualCOMMITHASH}" | grep -c "${COMMITHASH}")
|
||||
if [ ${matches} -eq 0 ]; then
|
||||
cd ..
|
||||
rm -rf raspiblitz 2>/dev/null
|
||||
echo "error='COMMITHASH of branch does not match'"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -224,6 +241,7 @@ fi
|
|||
|
||||
|
||||
echo "# clean up"
|
||||
cd ..
|
||||
rm -rf raspiblitz 2>/dev/null
|
||||
|
||||
echo "# SIGN & SECURE IMAGE ###########################################"
|
||||
|
|
Loading…
Add table
Reference in a new issue