doinst.sh 376 B

1234567891011121314151617
  1. config() {
  2. NEW="${1}.new"
  3. OLD="$1"
  4. # If there's no config file by that name, mv it over:
  5. if [ ! -r $OLD ]; then
  6. mv $NEW $OLD
  7. elif [ "$(md5sum <$OLD)" = "$(md5sum <$NEW)" ]; then
  8. # toss the redundant copy
  9. rm $NEW
  10. fi
  11. # Otherwise, we leave the .new copy for the admin to consider...
  12. }
  13. config etc/iscsi/iscsid.conf
  14. config etc/iscsi/initiatorname.iscsi