Compare commits

...

4 Commits

Author SHA1 Message Date
Kroese
914099fd12
build: Add --root-user-action flag (#967)
Some checks are pending
Build / Check (push) Waiting to run
Build / Build (push) Blocked by required conditions
2025-04-07 18:47:36 +02:00
Kroese
639725957d
fix: Permission errors on QNAP (#966) 2025-04-07 18:36:47 +02:00
Kroese
64bbe82c4a
fix: KVM warning (#965) 2025-04-07 17:44:26 +02:00
Kroese
73a13e5697
fix: QNAP permission errors (#964) 2025-04-07 17:20:14 +02:00
4 changed files with 23 additions and 16 deletions

View File

@ -44,7 +44,7 @@ RUN set -eu && \
netcat-openbsd \
qemu-system-x86 && \
apt-get clean && \
pip3 install --no-cache-dir --break-system-packages dissect.cstruct && \
pip3 install --no-cache-dir --break-system-packages --root-user-action dissect.cstruct && \
mkdir -p /etc/qemu && \
echo "allow br0" > /etc/qemu/bridge.conf && \
unlink /etc/nginx/sites-enabled/default && \

View File

@ -270,12 +270,9 @@ mv "$HDA.tgz" "$HDA.txz"
[ -d "$PKG" ] && mv "$PKG/" "$MOUNT/.SynoUpgradePackages/"
rm -f "$MOUNT/.SynoUpgradePackages/ActiveInsight-"*
[ -s "$HDP.txz" ] && tar xpfJ "$HDP.txz" --absolute-names -C "$MOUNT/"
if [ -s "$IDB.txz" ]; then
INDEX_DB="$MOUNT/usr/syno/synoman/indexdb/"
INDEX_DB="$MOUNT/usr/syno/synoman/indexdb"
mkdir -p "$INDEX_DB"
tar xpfJ "$IDB.txz" --absolute-names -C "$INDEX_DB"
fi
LABEL="1.44.1-42218"
@ -284,6 +281,8 @@ NUMBLOCKS="2097152" # (16777216 * 512) / 4096
MSG="Installing system partition..."
fakeroot -- bash -c "set -Eeu;\
[ -s $HDP.txz ] && tar xpfJ $HDP.txz --absolute-names -C $MOUNT/;\
[ -s $IDB.txz ] && tar xpfJ $IDB.txz --absolute-names -C $INDEX_DB/;\
tar xpfJ $HDA.txz --absolute-names --skip-old-files -C $MOUNT/;\
printf '%b%s%b' '\E[1;34m \E[1;36m' 'Install: $MSG' '\E[0m\n';\
mke2fs -q -t ext4 -b 4096 -d $MOUNT/ -L $LABEL -F -E offset=$OFFSET $SYSTEM $NUMBLOCKS"

View File

@ -338,17 +338,17 @@ closeNetwork() {
checkOS() {
local name
local kernel
local os=""
local if="macvlan"
name=$(uname -a)
kernel=$(uname -a)
[[ "${name,,}" == *"darwin"* ]] && os="Docker Desktop for macOS"
[[ "${name,,}" == *"microsoft"* ]] && os="Docker Desktop for Windows"
[[ "${kernel,,}" == *"darwin"* ]] && os="Docker Desktop for macOS"
[[ "${kernel,,}" == *"microsoft"* ]] && os="Docker Desktop for Windows"
if [[ "$DHCP" == [Yy1]* ]]; then
if="macvtap"
[[ "${name,,}" == *"synology"* ]] && os="Synology Container Manager"
[[ "${kernel,,}" == *"synology"* ]] && os="Synology Container Manager"
fi
if [ -n "$os" ]; then

View File

@ -37,14 +37,14 @@ if [[ "$KVM" != [Nn]* ]]; then
KVM_ERR=""
if [ ! -e /dev/kvm ]; then
KVM_ERR="(device file missing)"
KVM_ERR="(/dev/kvm is missing)"
else
if ! sh -c 'echo -n > /dev/kvm' &> /dev/null; then
KVM_ERR="(no write access)"
KVM_ERR="(/dev/kvm is unwriteable)"
else
flags=$(sed -ne '/^flags/s/^.*: //p' /proc/cpuinfo)
if ! grep -qw "vmx\|svm" <<< "$flags"; then
KVM_ERR="(vmx/svm disabled)"
KVM_ERR="(not enabled in BIOS)"
fi
fi
fi
@ -53,9 +53,17 @@ if [[ "$KVM" != [Nn]* ]]; then
KVM="N"
if [[ "$OSTYPE" =~ ^darwin ]]; then
warn "you are using macOS which has no KVM support, this will cause a major loss of performance."
else
error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance."
error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)."
else
kernel=$(uname -a)
case "${kernel,,}" in
*"microsoft"* )
error "Please bind '/dev/kvm' as a volume in the optional container settings when using Docker Desktop." ;;
*"synology"* )
error "Please make sure that Synology VMM (Virtual Machine Manager) is installed and that '/dev/kvm' is binded to this container." ;;
*)
error "KVM acceleration is not available $KVM_ERR, this will cause a major loss of performance."
error "See the FAQ for possible causes, or continue without it by adding KVM: \"N\" (not recommended)." ;;
esac
[[ "$DEBUG" != [Yy1]* ]] && exit 88
fi
fi