diff options
Diffstat (limited to 'testing/source/grub/doinst.sh')
-rw-r--r-- | testing/source/grub/doinst.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/source/grub/doinst.sh b/testing/source/grub/doinst.sh new file mode 100644 index 000000000..54c06904f --- /dev/null +++ b/testing/source/grub/doinst.sh @@ -0,0 +1,18 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Process config files in etc/grub.d/: +for file in etc/grub.d/*.new ; do + config $file +done +config etc/default/grub.new |