confd: minor, logging and coding style

- Remove duplicate logs due to logger logging also to stderr
 - Fix coding style in new test-override-startup code path

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-09-26 15:49:45 +02:00
parent e483d295da
commit 0a06fc0571
+6 -6
View File
@@ -28,12 +28,12 @@ perms()
note()
{
logger -s -I $$ -p user.notice -t load "$*"
logger -I $$ -p user.notice -t load "$*"
}
err()
{
logger -s -I $$ -p user.error -t load "$*"
logger -I $$ -p user.error -t load "$*"
}
@@ -60,12 +60,12 @@ config=$1
if [ -f "/mnt/aux/test-mode" ] && [ "$config" = "startup-config" ]; then
if [ -f "/mnt/aux/test-override-startup" ]; then
rm -f "/mnt/aux/test-override-startup"
else
if [ -f "/mnt/aux/test-override-startup" ]; then
rm -f "/mnt/aux/test-override-startup"
else
note "Test mode detected, switching to test-config"
config="test-config"
fi
fi
fi
if [ -f "$config" ]; then