Last change
on this file since 2594 was 2591, checked in by Bruno Cornec, 14 years ago |
r3723@localhost: bruno | 2010-03-09 23:56:51 +0100
- No error msg if mondorestore.cfg doesn't exist (mindi alone)
|
-
Property svn:keywords
set to
Id
|
File size:
758 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # $Id: hack-cfg-if-necessary 2591 2010-03-11 01:56:00Z bruno $
|
---|
4 | #
|
---|
5 |
|
---|
6 | if ! mount | grep cdrom ; then
|
---|
7 | LogIt "CD-ROM is not mounted. Darn."
|
---|
8 | exit 0
|
---|
9 | fi
|
---|
10 |
|
---|
11 | if ! ls /mnt/cdrom/archives/* > /dev/null 2> /dev/null ; then
|
---|
12 | LogIt "Can't find /mnt/cdrom/archives; darn."
|
---|
13 | exit 0
|
---|
14 | fi
|
---|
15 |
|
---|
16 | LogIt "OK, we've found /mnt/cdrom/archives/*; great."
|
---|
17 |
|
---|
18 | if [ -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
|
---|
23 | fi
|
---|
24 |
|
---|
25 | if [ -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."
|
---|
29 | fi
|
---|
30 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.