diff options
-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 |