[Rear-users] SF.net SVN: rear:[453] trunk

schlomoschapiro at users.sourceforge.net schlomoschapiro at users.sourceforge.net
Wed May 11 11:56:22 CEST 2011


Revision: 453
          http://rear.svn.sourceforge.net/rear/?rev=453&view=rev
Author:   schlomoschapiro
Date:     2011-05-11 09:56:21 +0000 (Wed, 11 May 2011)

Log Message:
-----------
! use /boot/syslinux for recent syslinux
- cosmetic fixes
- no udevtrigger after lvm disable as udev re-enables lvm :-(
  (at least on Ubuntu 10.04)

Modified Paths:
--------------
    trunk/etc/rear/templates/RESULT_usage_USB.txt
    trunk/usr/share/rear/build/GNU/Linux/13_create_dotfiles.sh
    trunk/usr/share/rear/lib/_input-output-functions.sh
    trunk/usr/share/rear/lib/linux-functions.sh
    trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh
    trunk/usr/share/rear/recreate/GNU/Linux/09_disable_lvm2_md.sh

Modified: trunk/etc/rear/templates/RESULT_usage_USB.txt
===================================================================
--- trunk/etc/rear/templates/RESULT_usage_USB.txt	2011-05-11 07:52:53 UTC (rev 452)
+++ trunk/etc/rear/templates/RESULT_usage_USB.txt	2011-05-11 09:56:21 UTC (rev 453)
@@ -1,7 +1,7 @@
 How to recover your system:
 ---------------------------
 
-you have to prepare a bootable USB stick with syslinux on it (look also
+you have to prepare a bootable USB stick with extlinux on it (look also
 at http://syslinux.zytor.com/usbkey.php for further explanations on this
 topic).
 

Modified: trunk/usr/share/rear/build/GNU/Linux/13_create_dotfiles.sh
===================================================================
--- trunk/usr/share/rear/build/GNU/Linux/13_create_dotfiles.sh	2011-05-11 07:52:53 UTC (rev 452)
+++ trunk/usr/share/rear/build/GNU/Linux/13_create_dotfiles.sh	2011-05-11 09:56:21 UTC (rev 453)
@@ -26,8 +26,8 @@
 less /var/lib/rear/layout/diskrestore.sh   # View disk restore script
 less /var/lib/rear/layout/disklayout.conf  # View disk layout configuration
 less $LOGFILE   # View ReaR's log file
-loadkeys -d             # Load default keyboard layout (US)
-rear recover                          # Recover your system
+loadkeys -d     # Load default keyboard layout (US)
+rear recover    # Recover your system
 EOF
 chmod 0644 $ROOTFS_DIR/root/.bash_history
 

Modified: trunk/usr/share/rear/lib/_input-output-functions.sh
===================================================================
--- trunk/usr/share/rear/lib/_input-output-functions.sh	2011-05-11 07:52:53 UTC (rev 452)
+++ trunk/usr/share/rear/lib/_input-output-functions.sh	2011-05-11 09:56:21 UTC (rev 453)
@@ -83,8 +83,10 @@
 }
 
 Error() {
-	# Print stack strace on error
-	let c=0 ; while caller $c ; do let c++ ; done | sed 's/^/Trace: /' 1>&2 ; unset c
+	if type caller &>/dev/null ; then
+		# Print stack strace on error
+		let c=0 ; while caller $c ; do let c++ ; done | sed 's/^/Trace: /' 1>&2 ; unset c
+	fi
 
 	VERBOSE=1
 	EXIT_CODE=1

Modified: trunk/usr/share/rear/lib/linux-functions.sh
===================================================================
--- trunk/usr/share/rear/lib/linux-functions.sh	2011-05-11 07:52:53 UTC (rev 452)
+++ trunk/usr/share/rear/lib/linux-functions.sh	2011-05-11 09:56:21 UTC (rev 453)
@@ -119,6 +119,7 @@
 		test -x "$k" || Error "[BinCopyTo] Source $k is not an executable"
 		cp -v -a -L "$k" "$TARGET" || Error "[BinCopyTo] Could not copy '$k' to '$TARGET'"
 		strip -s "$TARGET/$(basename "$k")" 2>/dev/null
+		: # make sure that a failed strip won't fail the BinCopyTo
 	done
 }
 

Modified: trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh
===================================================================
--- trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh	2011-05-11 07:52:53 UTC (rev 452)
+++ trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh	2011-05-11 09:56:21 UTC (rev 453)
@@ -2,7 +2,7 @@
 set_syslinux_features
 
 if [ "$FEATURE_SYSLINUX_BOOT_SYSLINUX" ]; then
-    USB_BOOT_PREFIX=boot
+    USB_BOOT_PREFIX=boot/syslinux
 else
     USB_BOOT_PREFIX=
 fi
@@ -11,7 +11,7 @@
     mkdir -vp "$BUILD_DIR/usbfs/$USB_BOOT_PREFIX" >&8 || Error "Could not create USB boot dir '$BUILD_DIR/usbfs/$USB_BOOT_PREFIX'"
 fi
 
-make_syslinux_config $BUILD_DIR/boot extlinux >BUILD_DIR/boot/extlinux.conf
+make_syslinux_config $BUILD_DIR/boot extlinux >$BUILD_DIR/boot/extlinux.conf
 
 Log "Created extlinux configuration"
 

Modified: trunk/usr/share/rear/recreate/GNU/Linux/09_disable_lvm2_md.sh
===================================================================
--- trunk/usr/share/rear/recreate/GNU/Linux/09_disable_lvm2_md.sh	2011-05-11 07:52:53 UTC (rev 452)
+++ trunk/usr/share/rear/recreate/GNU/Linux/09_disable_lvm2_md.sh	2011-05-11 09:56:21 UTC (rev 453)
@@ -4,13 +4,16 @@
 
 # just in case, disable LVM and MD
 
-lvm vgchange -a n -v 1>&2 8>&- 7>&-
+lvm vgchange -a n -v 1>&2 || Log "Error $? while disabling lvm"
+sleep 1
+if lvm lvs --noheadings --options Attr | grep -q a ; then
+	Log "Some LVs are still active after deactivating LVM"
+	lvm lvs 1>&2
+	BugError "There are still some LVs active after deactivating LVM"
+fi
 
 while read device junk ; do
 	mdadm --stop /dev/$device 1>&2
 	ProgressStopIfError $? "Could not stop RAID device '$device' !"
 done < <(grep active /proc/mdstat)
 
-# kick udev to deal with the changed devices
-my_udevtrigger
-my_udevsettle


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rear-users mailing list