Skip to content

Commit

Permalink
Remove unrelated changes
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Feb 3, 2025
1 parent b530b68 commit 23f0620
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
4 changes: 2 additions & 2 deletions build-image/first-boot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ! is_bookworm; then
rfkill unblock wifi # Wi-Fi is blocked by Raspi OS default since bullseye(?)
fi
webserver=/boot/webserver.bash
[[ -f /boot/firmware/webserver.bash ]] && ln -sfn /boot/firmware/webserver.bash "$webserver"
[[ -f /boot/firmware/webserver.bash ]] && ln -s /boot/firmware/webserver.bash "$webserver"

if [[ "${debugmode:-on}" == "on" ]]; then
unset SILENT
Expand Down Expand Up @@ -91,7 +91,7 @@ hotSpot=${hotspot:-enable}
wifiSSID="$wifi_ssid"
# shellcheck source=/etc/openhabian.conf disable=SC2154
wifiPassword="$wifi_password"
if ! running_in_docker && is_bookworm; then
if is_pi && is_bookworm; then
echo -n "$(timestamp) [openHABian] Setting up NetworkManager and Wi-Fi connection... "
systemctl enable --now NetworkManager
nmcli r wifi on
Expand Down
2 changes: 1 addition & 1 deletion functions/openhab.bash
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ openhab_setup() {
echo -n "$(timestamp) [openHABian] Setting up openHAB service... "
if ! cond_redirect zram_dependency install ${ohPkgName}; then return 1; fi
if ! cond_redirect systemctl -q daemon-reload; then echo "FAILED (reload)"; return 1; fi
if cond_redirect systemctl enable --now ${ohPkgName}.service; then echo "OK"; else echo "FAILED (enable service)"; journalctl -xeu openhab.service; systemctl status openhab.service; return 1; fi
if cond_redirect systemctl enable --now ${ohPkgName}.service; then echo "OK"; else echo "FAILED (enable service)"; return 1; fi

openhab_misc
create_systemd_dependencies
Expand Down
20 changes: 1 addition & 19 deletions tests/test.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e

## This function formats log messages
##
Expand All @@ -18,25 +19,6 @@ if [[ $1 == "shellcheck" ]]; then
shellcheck -x -s bash functions/*.bash
shellcheck -x -s bash build-image/*.bash
shellcheck -x -s bash build.bash tests/ci-setup.bash
elif [[ $1 == "docker-install" ]]; then
if [[ -n $2 ]]; then
saved_java_opt="$(ggrep -oP 'java_opt=\K.*' build-image/openhabian.conf)"
gsed -i 's|java_opt=.*$|java_opt='"${2}"'|' build-image/openhabian.conf
fi
if [[ -n $3 ]]; then
saved_debugmode="$(ggrep -oP 'debugmode=\K.*' build-image/openhabian.conf)"
gsed -i 's|debugmode=.*$|debugmode='"${3}"'|' build-image/openhabian.conf
fi
docker buildx build --tag openhabian/install-openhabian -f tests/Dockerfile.rpi5-installation --platform linux/arm64 .
docker run --privileged --rm --platform linux/arm64 --name openhabian -d openhabian/install-openhabian:latest
docker exec -i "openhabian" bash -c './build.bash local-test && /boot/first-boot.bash'
docker stop openhabian
if [[ -n $2 ]]; then
gsed -i 's|java_opt=.*$|java_opt='"${saved_java_opt}"'|' build-image/openhabian.conf
fi
if [[ -n $3 ]]; then
gsed -i 's|debugmode=.*$|debugmode='"${saved_debugmode}"'|' build-image/openhabian.conf
fi
else
echo_process "Please provide a valid test profile, \"shellcheck\". Exiting"
exit 0
Expand Down

0 comments on commit 23f0620

Please sign in to comment.