diff options
author | Dubiousjim <dubiousjim@gmail.com> | 2013-06-29 16:41:27 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-30 11:20:13 +0000 |
commit | 7558f26d28e1bcc6a62c42405c65ab14cc632ef3 (patch) | |
tree | 78d8d3bc195fb29de3a347fbb6bd9a2c92f609e5 /main/syslinux | |
parent | 5eebfc3d655b327fcd0e6ba306e226516a70ce2f (diff) | |
download | aports-7558f26d28e1bcc6a62c42405c65ab14cc632ef3.tar.bz2 aports-7558f26d28e1bcc6a62c42405c65ab14cc632ef3.tar.xz |
main/syslinux: don't create backup when no changes
Diffstat (limited to 'main/syslinux')
-rwxr-xr-x | main/syslinux/update-extlinux | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index 66bc0edc73..0ba4bbf21d 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -169,18 +169,22 @@ if [ -f "/boot/reboot.c32" ]; then echo "" >> $conf.new fi +if cmp --quiet $conf.new $conf; then + everbose "Configuration unchanged." + rm $conf.new +fi if [ "$overwrite" != "1" ]; then exit 0 -fi +elif [ -f "$conf.new" ]; then + # keep a backup just in case + if [ -f "$conf" ]; then + mv $conf $conf.old + fi -# keep a backup just in case -if [ -f "$conf" ]; then - mv $conf $conf.old + mv $conf.new $conf fi -mv $conf.new $conf - everbose "Installing libutil.c32 libcom32.c32 mboot.c32 menu.c32 vesamenu.c32 to /boot." cp /usr/share/syslinux/libutil.c32 \ /usr/share/syslinux/libcom32.c32 \ |