Blame 0010-Fix-live-update-script-769970.patch

Harald Hoyer 3957aa
From 14599cd760203a43be992c50fa1dc6a4c6e473ea Mon Sep 17 00:00:00 2001
Harald Hoyer 3957aa
From: "Brian C. Lane" <bcl@redhat.com>
Harald Hoyer 3957aa
Date: Wed, 4 Jan 2012 09:21:05 -0800
Harald Hoyer 3957aa
Subject: [PATCH] Fix live update script (#769970)
Harald Hoyer 3957aa
Harald Hoyer 3957aa
pushd and popd are not available in the shell used by dracut.
Harald Hoyer 3957aa
---
Harald Hoyer 3957aa
 modules.d/90dmsquash-live/apply-live-updates.sh |    5 +++--
Harald Hoyer 3957aa
 1 files changed, 3 insertions(+), 2 deletions(-)
Harald Hoyer 3957aa
Harald Hoyer 3957aa
diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh
Harald Hoyer 3957aa
index 8dce5d4..f840d1a 100755
Harald Hoyer 3957aa
--- a/modules.d/90dmsquash-live/apply-live-updates.sh
Harald Hoyer 3957aa
+++ b/modules.d/90dmsquash-live/apply-live-updates.sh
Harald Hoyer 3957aa
@@ -1,8 +1,9 @@
Harald Hoyer 3957aa
 #!/bin/sh
Harald Hoyer 3957aa
 if [ -b /dev/mapper/live-rw ]; then
Harald Hoyer 3957aa
-    if pushd /updates &>/dev/null; then
Harald Hoyer 3957aa
+    if [ -d /updates ]; then
Harald Hoyer 3957aa
         echo "Applying updates to live image..."
Harald Hoyer 3957aa
+        cd /updates
Harald Hoyer 3957aa
         /bin/cp -a -t $NEWROOT .
Harald Hoyer 3957aa
-        popd &>/dev/null
Harald Hoyer 3957aa
+        cd -
Harald Hoyer 3957aa
     fi
Harald Hoyer 3957aa
 fi