From a29952899808323a5580aab317df3fa36324057c Mon Sep 17 00:00:00 2001 From: sagredo-dev Date: Mon, 14 Oct 2024 19:42:15 +0200 Subject: [PATCH] package/run.rclocal will find both /etc/rc.local /etc/rc.d/rc.local --- CHANGES | 2 ++ admin/daemontools/package/run.rclocal | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 79a39f1..a1e050b 100644 --- a/CHANGES +++ b/CHANGES @@ -106,4 +106,6 @@ Oct 10, 2024 Oct 14, 2024 version daemontools 0.78.3 (Roberto Puzzanghera) - all package/ scripts now run the bash shell + - package/run script will recognize if we are in an lxc container to skip inittab configuration + - package/run.rclocal will find both /etc/rc.local /etc/rc.d/rc.local - daemontools-0.78.2 directory renamed to daemontools diff --git a/admin/daemontools/package/run.rclocal b/admin/daemontools/package/run.rclocal index 0b7cee2..219ec77 100755 --- a/admin/daemontools/package/run.rclocal +++ b/admin/daemontools/package/run.rclocal @@ -1,12 +1,12 @@ #!/bin/bash -if grep svscanboot /etc/rc.local >/dev/null +if grep svscanboot $1 >/dev/null then echo 'rc.local contains an svscanboot line. I assume that svscan is already running.' else - echo 'Adding svscanboot to /etc/rc.local...' - rm -f /etc/rc.local'{new}' - cat /etc/rc.local package/boot.rclocal > /etc/rc.local'{new}' - mv -f /etc/rc.local'{new}' /etc/rc.local + echo "Adding svscanboot to $1..." + rm -f ${1}'{new}' + cat $1 package/boot.rclocal > ${1}'{new}' + mv -f ${1}'{new}' $1 echo 'Reboot now to start svscan.' fi