source: MondoRescue/trunk/mindi/rootfs/sbin/hack-cfg-if-necessary@ 1

Last change on this file since 1 was 1, checked in by bcornec, 19 years ago

Initial import from latest mondo-2.04_cvs_20050503/mindi-1.04_cvs_20050503 on http://www.mondorescue.org

File size: 665 bytes
Line 
1#!/bin/sh
2
3if ! mount | grep cdrom ; then
4 LogIt "CD-ROM is not mounted. Darn."
5 exit 0
6fi
7
8if ! ls /mnt/cdrom/archives/* > /dev/null 2> /dev/null ; then
9 LogIt "Can't find /mnt/cdrom/archives; darn."
10 exit 0
11fi
12
13LogIt "OK, we've found /mnt/cdrom/archives/*; great."
14
15if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg ; then
16 LogIt "Config file is fine, BTW."
17 exit 0
18fi
19
20LogIt "Re-jigging mondo-restore.cfg because you backed up to ISOs and then burned them to CDs" 1
21mv -f /tmp/mondo-restore.cfg /tmp/mrco
22cat /tmp/mrco | sed 's/backup-media-type iso/backup-media-type cdr/' > /tmp/mondo-restore.cfg
23LogIt "Done re-jigging. Yay."
24exit 0
Note: See TracBrowser for help on using the repository browser.