Welcome to little lamb

Code » anopa » commit 868445e

stage3: Fixes

author Olivier Brunel
2018-01-27 18:06:33 UTC
committer Olivier Brunel
2018-01-28 14:44:25 UTC
parent 09593f875cae8846c6beff10b55f310567ddcca7

stage3: Fixes

- Use @BINDIR@ instead of hardcoded /bin when copying binaries
- Also copy fdclose since it might not be available in the initramfs

src/scripts/aa-stage3 +3 -2

diff --git a/src/scripts/aa-stage3 b/src/scripts/aa-stage3
index 7911deb..6cb2c58 100755
--- a/src/scripts/aa-stage3
+++ b/src/scripts/aa-stage3
@@ -74,7 +74,8 @@ foreground {
     if -n
     {
         # grab the chroot binary for after the pivot
-        if { cp /bin/aa-chroot . }
+        if { cp @BINDIR@/aa-chroot . }
+        if { cp @BINDIR@/fdclose . }
         # PIVOT!
         if { aa-pivot -O3 . root-fs }
     }
@@ -85,6 +86,6 @@ foreground {
     emptyenv -c sh -i
 }
 # close the logger now
-fdclose 3
+./fdclose 3
 # And let initramfs end things ($1 is halt/reboot/poweroff)
 ./aa-chroot . /shutdown ${1}