summaryrefslogtreecommitdiff
path: root/sub/busybox/install-bbsuid
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-05-22 21:56:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-05-22 21:56:04 +0000
commit82d0f92ab8b84466ae20ab919c1f9c3577b5cecb (patch)
tree776015ae6c6a386125b2d39e13b62f91b99548f8 /sub/busybox/install-bbsuid
downloadlh-bootstrap-82d0f92ab8b84466ae20ab919c1f9c3577b5cecb.tar.xz
Initial commit
Diffstat (limited to 'sub/busybox/install-bbsuid')
-rwxr-xr-xsub/busybox/install-bbsuid18
1 files changed, 18 insertions, 0 deletions
diff --git a/sub/busybox/install-bbsuid b/sub/busybox/install-bbsuid
new file mode 100755
index 0000000..da73864
--- /dev/null
+++ b/sub/busybox/install-bbsuid
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+output="$1"
+file="$2"
+
+cp -f $output/build-host/bbsuid $output/rootfs/opt/busybox/bin/bbsuid
+s6-chmod 4755 $output/rootfs/opt/busybox/bin/bbsuid
+
+for i in $(s6-ls $output/rootfs/opt/busybox/bin | grep -xFf $file) ; do
+ rm -f $output/rootfs/opt/busybox/bin/$i
+ s6-ln -s bbsuid $output/rootfs/opt/busybox/bin/$i
+done
+
+for i in $(s6-ls $output/rootfs/opt/busybox/sbin | grep -xFf $file) ; do
+ rm -f $output/rootfs/opt/busybox/sbin/$i
+ s6-ln -s ../bin/bbsuid $output/rootfs/opt/busybox/bin/$i
+done
+