#!/bin/sh 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/rc.d/rc.fuse.new ### # Use rc.local to start fuse at boot. ### # if rc.hal is executable, run it on startup run=`grep ". /etc/rc.d/rc.fuse" etc/rc.d/rc.local` if [[ "${run}" == "" ]]; then cat << EOF >> etc/rc.d/rc.local #Fuse # To disable Fuse, chmod rc.fuse to 644 if [ -x /etc/rc.d/rc.fuse ]; then sh /etc/rc.d/rc.fuse start fi EOF fi