sys-apps/busybox: migrate to /run

This commit is contained in:
Mike Frysinger
2017-03-11 20:37:01 -08:00
parent f39d1b8535
commit 7c558088fc
6 changed files with 28 additions and 18 deletions
+12 -7
View File
@@ -36,17 +36,19 @@ S=${WORKDIR}/${MY_P}
busybox_config_option() {
local flag=$1 ; shift
if [[ ${flag} != [yn] ]] ; then
if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
busybox_config_option $(usex ${flag} y n) "$@"
return
fi
local expr
while [[ $# -gt 0 ]] ; do
if [[ ${flag} == "y" ]] ; then
sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
else
sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
fi
einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
case ${flag} in
y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
*) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
esac
sed -i -e "${expr}" .config || die
einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
shift
done
}
@@ -125,6 +127,9 @@ src_configure() {
busybox_config_option y ASH
busybox_config_option n HUSH
busybox_config_option '"/run"' PID_FILE_PATH
busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
# disable ipv6 applets
if ! use ipv6; then
busybox_config_option n FEATURE_IPV6
+12 -7
View File
@@ -36,17 +36,19 @@ S=${WORKDIR}/${MY_P}
busybox_config_option() {
local flag=$1 ; shift
if [[ ${flag} != [yn] ]] ; then
if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
busybox_config_option $(usex ${flag} y n) "$@"
return
fi
local expr
while [[ $# -gt 0 ]] ; do
if [[ ${flag} == "y" ]] ; then
sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
else
sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
fi
einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
case ${flag} in
y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
*) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
esac
sed -i -e "${expr}" .config || die
einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
shift
done
}
@@ -125,6 +127,9 @@ src_configure() {
busybox_config_option y ASH
busybox_config_option n HUSH
busybox_config_option '"/run"' PID_FILE_PATH
busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
# disable ipv6 applets
if ! use ipv6; then
busybox_config_option n FEATURE_IPV6
+1 -1
View File
@@ -4,7 +4,7 @@
command="/bin/busybox klogd"
command_args="${KLOGD_OPTS}"
pidfile="/var/run/klogd.pid"
pidfile="/run/klogd.pid"
depend() {
need clock hostname
+1 -1
View File
@@ -4,7 +4,7 @@
command="/bin/busybox ntpd"
command_args="${NTPD_OPTS}"
pidfile="/var/run/ntpd.pid"
pidfile="/run/ntpd.pid"
depend() {
use net dns logger
+1 -1
View File
@@ -4,7 +4,7 @@
command="/bin/busybox syslogd"
command_args="${SYSLOGD_OPTS}"
pidfile="/var/run/syslogd.pid"
pidfile="/run/syslogd.pid"
depend() {
need clock hostname
+1 -1
View File
@@ -4,4 +4,4 @@
command="/bin/busybox watchdog"
command_args="${WATCHDOG_OPTS}"
pidfile="/var/run/watchdog.pid"
pidfile="/run/watchdog.pid"