Make sure the previous move of cd commands cannot result in unexpected regressions
authorSebastian Pipping <sebastian@pipping.org>
Thu, 12 Apr 2012 04:17:54 +0000 (06:17 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Thu, 12 Apr 2012 04:18:27 +0000 (06:18 +0200)
defaults/linuxrc

index 7f6883671ca5427a495ef603744c5285810627a5..23ec2b0538d7f05029a9e803a3da3328fc41909d 100755 (executable)
@@ -283,10 +283,8 @@ setup_hotplug
 # Start mdev
 if [ "${KV_2_6_OR_GREATER}" ]
 then
-       cd /sys
        good_msg 'Activating mdev'
-       mdev -s  || bad_msg "Failed to receive dynamic updates from mdev"
-       cd /
+       ( cd /sys && mdev -s ) || bad_msg "Failed to receive dynamic updates from mdev"
 fi
 
 # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel
@@ -316,6 +314,8 @@ sdelay
 # Setup slow USB bits
 setup_slowusb
 
+cd /
+
 # if doslowusb is passed, pause other 10 seconds here, after mdev load
 [ "${DO_slowusb}" ] && sleep 10