From 77358f0632fdee730e72717c80ea484e5809472e Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 11 Mar 2024 13:30:07 +0100 Subject: [PATCH] feat: Add option to disable Samba (#253) --- .github/workflows/build.yml | 7 +++++++ Dockerfile | 4 ++-- src/entry.sh | 7 ++++++- src/samba.sh | 3 +++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b87501f..a193a38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,6 +92,13 @@ jobs: uses: action-pack/bump@v2 with: token: ${{ secrets.REPO_ACCESS_TOKEN }} + - + name: Push to Gitlab mirror + uses: action-pack/gitlab-sync@v3 + with: + url: ${{ secrets.GITLAB_URL }} + token: ${{ secrets.GITLAB_TOKEN }} + username: ${{ secrets.GITLAB_USERNAME }} - name: Send mail uses: action-pack/send-mail@v1 diff --git a/Dockerfile b/Dockerfile index 35ea722..ac3dd01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM scratch -COPY --from=qemux/qemu-docker:4.15 / / +COPY --from=qemux/qemu-docker:4.16 / / -ARG DEBCONF_NOWARNINGS="yes" +ARG DEBCONF_NOWARNINGS "yes" ARG DEBIAN_FRONTEND "noninteractive" ARG DEBCONF_NONINTERACTIVE_SEEN "true" diff --git a/src/entry.sh b/src/entry.sh index a9d3111..83b2457 100644 --- a/src/entry.sh +++ b/src/entry.sh @@ -23,6 +23,10 @@ trap - ERR info "Booting $APP using $VERS..." [[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo +if [[ "$CONSOLE" == [Yy]* ]]; then + exec qemu-system-x86_64 ${ARGS:+ $ARGS} +fi + { qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || : (( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15 @@ -31,4 +35,5 @@ tail -fn +0 "$QEMU_LOG" 2>/dev/null & cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" & wait $! || : -sleep 1 && finish 0 +sleep 1 & wait $! +finish 0 diff --git a/src/samba.sh b/src/samba.sh index 6286492..1f8f3c1 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash set -Eeuo pipefail +: "${SAMBA:="Y"}" + [[ "$DHCP" == [Yy1]* ]] && return 0 +[[ "$SAMBA" != [Yy1]* ]] && return 0 SHARE="$STORAGE/shared"