dracut/0064-TEST-99-RPM-test-trap.patch
Harald Hoyer 2265b4cd57 dracut-020-70.git20120710
+- more systemd unit fixups
+- restart systemd-journald in switch-root post
+- fixed dracut-install loader ldd error message
2012-07-10 12:45:52 +02:00

24 lines
922 B
Diff

From 43bac63e33a31f4d86ca8f16b439dd33336a374b Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 9 Jul 2012 20:44:48 +0200
Subject: [PATCH] TEST-99-RPM test trap
---
test/TEST-99-RPM/test.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh
index 25c1895..66f0beb 100755
--- a/test/TEST-99-RPM/test.sh
+++ b/test/TEST-99-RPM/test.sh
@@ -14,6 +14,9 @@ test_run() {
mkdir -p "$rootdir/sys"
mkdir -p "$rootdir/dev"
+trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf "$rootdir"; }; exit $ret;' EXIT
+trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf "$rootdir"; }; exit 1;' SIGINT
+
mount --bind /proc "$rootdir/proc"
mount --bind /sys "$rootdir/sys"
mount -t devtmpfs devtmpfs "$rootdir/dev"