From 40593e3d24146c20cc4bd35e8f1717da67fb7ecb Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Wed, 3 Jun 2020 10:49:24 +0300 Subject: busybox: add new utils --- core/busybox/build | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'core/busybox/build') diff --git a/core/busybox/build b/core/busybox/build index af6445af..568836ed 100755 --- a/core/busybox/build +++ b/core/busybox/build @@ -1,5 +1,11 @@ #!/bin/sh -e +kinstall() { + # usage: kisntall 755 filename /usr/bin/file + mkdir -p "${3%/*}"; cp "$2" "$3" + chmod "$1" "$3" +} + for patch in *.patch; do patch -p1 < "$patch" done @@ -35,15 +41,14 @@ done # Set suid on busybox suid. chmod u+s "$1/usr/bin/busybox-suid" -# Install runit and sysmgr services -for service in crond.run ntpd.run syslogd.run acpid.run ; do - install -Dm755 "$service" "$1/etc/sv/${service%.*}/run" - install -Dm755 "$service" "$1/etc/sysmgr/${service%.*}" +# Install runit and sysmgr services. +for service in crond.run mdev.run ntpd.run syslogd.run acpid.run ; do + kinstall 755 "$service" "$1/etc/sv/${service%.*}/run" + kinstall 755 "$service" "$1/etc/sysmgr/${service%.*}" ln -s /run/runit/supervise.${service%.*} "$1/etc/sv/${service%.*}/supervise" done -# Install ntp config -install -Dm644 ntp.conf "$1/etc/ntp.conf" - -# Install inittab -install -Dm644 inittab "$1/etc/inittab" +# Install configurations for ntp, init, and mdev. +kinstall 644 ntp.conf "$1/etc/ntp.conf" +kinstall 644 inittab "$1/etc/inittab" +kinstall 644 mdev.conf "$1/etc/mdev.conf" -- cgit v1.2.3