From 7915513b546b34f32de7c7e15405a2ae68299e30 Mon Sep 17 00:00:00 2001 From: Jash Date: Sun, 8 Nov 2026 14:38:40 +0530 Subject: [PATCH] fix: parse zm.conf in postinst the way zoneminder does instead of sourcing it, fixes #4300 --- distros/beowulf/zoneminder.postinst | 14 ++++++++++++-- distros/ubuntu2004/zoneminder.postinst | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/distros/beowulf/zoneminder.postinst b/distros/beowulf/zoneminder.postinst index 032595355a..250d7a53b7 100644 --- a/distros/beowulf/zoneminder.postinst +++ b/distros/beowulf/zoneminder.postinst @@ -2,11 +2,21 @@ set -e +# zm.conf is not shell; read it the way ZoneMinder's PHP and Perl readers do. +zm_load_config () { + [ -r "$1" ] || return 0 + while IFS=' ' read -r zm_name zm_value; do + eval "$zm_name=\$zm_value" + done <