diff options
Diffstat (limited to 'scripts/update-rcconf')
-rwxr-xr-x | scripts/update-rcconf | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/update-rcconf b/scripts/update-rcconf new file mode 100755 index 000000000..bc896d3d1 --- /dev/null +++ b/scripts/update-rcconf @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P)) +. $topdir/.config + +rcconf=$topdir/root_${ADK_TARGET_SYSTEM}_${ADK_TARGET_LIBC}/etc/rc.conf + +for service in $(grep ^ADK_RUNTIME_START_ $topdir/.config |grep -v ADK_RUNTIME_START_SERVICES);do + rcname=$(echo $service|sed -e "s#ADK_RUNTIME_START_##") + rcname=$(echo $rcname| sed -e "s#=y##") + rcname=$(echo $rcname| sed -e "s#^BUSYBOX_##") + rcname=$(echo $rcname| tr '[:upper:]' '[:lower:]') + if [ $ADK_PKG_XBMCBOX = "y" ];then + sed -i -e "s#$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf + else + sed -i -e "s#$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf + fi +done |