Ignore:
Timestamp:
Mar 11, 2010, 2:56:00 AM (14 years ago)
Author:
Bruno Cornec
Message:

r3723@localhost: bruno | 2010-03-09 23:56:51 +0100

  • No error msg if mondorestore.cfg doesn't exist (mindi alone)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/rootfs/sbin/hack-cfg-if-necessary

    r2462 r2591  
    1616LogIt "OK, we've found /mnt/cdrom/archives/*; great."
    1717
    18 if ! grep "backup-media-type iso" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null ; then
    19     LogIt "Config file is fine, BTW."
    20     exit 0
     18if [ -f $MINDI_CACHE/mondorestore.cfg ]; then
     19    if [ !  grep "backup-media-type iso" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null] ; then
     20        LogIt "Config file is fine, BTW."
     21        exit 0
     22    fi
    2123fi
    2224
    23 LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1
    24 sed -i 's/backup-media-type iso/backup-media-type cdr/' $MINDI_CACHE/mondorestore.cfg
    25 LogIt "Done re-jigging. Yay."
     25if [ -f $MINDI_CACHE/mondorestore.cfg ]; then
     26    LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1
     27    sed -i 's/backup-media-type iso/backup-media-type cdr/' $MINDI_CACHE/mondorestore.cfg
     28    LogIt "Done re-jigging. Yay."
     29fi
    2630exit 0
Note: See TracChangeset for help on using the changeset viewer.