From 5bf6a79a6fdd9e0611e6cc8e5ee0f274dac018ca Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Fri, 3 May 2024 12:25:02 -0500 Subject: efi-sync: preserve sysVinit script perms --- efi-sync/doinst.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/efi-sync/doinst.sh b/efi-sync/doinst.sh index 45cc593..519c0d5 100644 --- a/efi-sync/doinst.sh +++ b/efi-sync/doinst.sh @@ -11,4 +11,15 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -config etc/rc.d/rc.efi-sync.new +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.efi-sync.new -- cgit v1.2.3