From ce538ef95cfeb483f1bf6aebc7cf03d2cacd7dcb Mon Sep 17 00:00:00 2001 From: "Cezary M. Kruk" Date: Tue, 9 Aug 2011 12:53:56 -0300 Subject: system/cdwrite: Added (CD/DVD reading/writing/encoding shell) Signed-off-by: Niels Horn --- system/cdwrite/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 system/cdwrite/doinst.sh (limited to 'system/cdwrite/doinst.sh') diff --git a/system/cdwrite/doinst.sh b/system/cdwrite/doinst.sh new file mode 100644 index 0000000000..5f41c93fe6 --- /dev/null +++ b/system/cdwrite/doinst.sh @@ -0,0 +1,14 @@ +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... +} + +config etc/cdwrite.conf.new -- cgit v1.2.3