commit 5bf6a79a6fdd9e0611e6cc8e5ee0f274dac018ca parent b169ab5c3a9de9095a4ce8db09bea7778cf67517 Author: Slack Coder <slackcoder@server.ky> Date: Fri, 3 May 2024 12:25:02 -0500 efi-sync: preserve sysVinit script perms Diffstat:
| M | efi-sync/doinst.sh | | | 13 | ++++++++++++- |
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git 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