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

Last change on this file since 30 was 30, checked in by bcornec, 14 years ago

Id property added on files to allow for better conf. management

  • Property svn:keywords set to Id
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.