diff options
author | Slack Coder <slackcoder@server.ky> | 2024-05-03 12:25:02 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2024-05-03 12:25:58 -0500 |
commit | 5bf6a79a6fdd9e0611e6cc8e5ee0f274dac018ca (patch) | |
tree | ae058a6326ef78f3ca2b4596121cf11dbd7da0cf | |
parent | b169ab5c3a9de9095a4ce8db09bea7778cf67517 (diff) | |
download | slackbuilds-5bf6a79a6fdd9e0611e6cc8e5ee0f274dac018ca.tar.xz |
efi-sync: preserve sysVinit script perms
-rw-r--r-- | efi-sync/doinst.sh | 13 |
1 files changed, 12 insertions, 1 deletions
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 |