[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/grub/devel grub-0.95-recheck-bad.patch,1.1,1.2
- From: fedora-cvs-commits redhat com
- To: fedora-cvs-commits redhat com
- Subject: rpms/grub/devel grub-0.95-recheck-bad.patch,1.1,1.2
- Date: Mon, 1 Aug 2005 14:30:26 -0400
Author: pjones
Update of /cvs/dist/rpms/grub/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10158
Modified Files:
grub-0.95-recheck-bad.patch
Log Message:
only do the .backup replacement when recheck is specified
get the test with grep right.
grub-0.95-recheck-bad.patch:
docs/grub-install.8 | 2 ++
docs/grub.info | 4 ++--
docs/grub.texi | 5 +++--
util/grub-install.in | 21 +++++++++++++++++++--
4 files changed, 26 insertions(+), 6 deletions(-)
Index: grub-0.95-recheck-bad.patch
===================================================================
RCS file: /cvs/dist/rpms/grub/devel/grub-0.95-recheck-bad.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- grub-0.95-recheck-bad.patch 25 Jul 2005 22:29:51 -0000 1.1
+++ grub-0.95-recheck-bad.patch 1 Aug 2005 18:30:19 -0000 1.2
@@ -32,23 +32,27 @@
fi
# Create the device map file if it is not present.
-@@ -357,7 +359,18 @@
+@@ -357,7 +359,22 @@
tmp=`sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' $device_map \
| sort | uniq -d | sed -n 1p`
if test -n "$tmp"; then
- echo "The drive $tmp is defined multiple times in the device map $device_map" 1>&2
-+ echo "The drive $tmp is defined multiple times in the new device map," 1>&2
-+ echo "reverting to backed up copy." 1>&2
-+ mv ${device_map}.backup $device_map
++ echo "The drive $tmp is defined multiple times in the new device map." 1>&2
++ if test $recheck = yes; then
++ echo "Reverting to backed up copy." 1>&2
++ mv ${device_map}.backup $device_map
++ fi
+ exit 1
+fi
+
+# Make sure device.map has at least one hd device
-+grep -q "^(hd[0-9])" $device_map
-+if [ "x$?" == "x0" ]; then
-+ echo "No suitable drive was found in the generated device map, " 1>&2
-+ echo "reverting to backed up copy." 1>&2
-+ mv ${device_map}.backup $device_map
++grep -q "^(hd[0-9]\+)" $device_map
++if [ "x$?" != "x0" ]; then
++ echo "No suitable drive was found in the generated device map." 1>&2
++ if test $recheck = yes; then
++ echo "Reverting to backed up copy." 1>&2
++ mv ${device_map}.backup $device_map
++ fi
exit 1
fi
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]