2 # This file is part of the OpenADK project. OpenADK is copyrighted
3 # material, please see the LICENCE file in the top-level directory.
5 topdir
=$
(readlink
-nf $
(dirname $0)/..
2>/dev
/null ||
(cd $
(dirname $0)/..
; pwd -P))
6 host=$
(gcc
-dumpmachine)
9 (*:$topdir/host_
$host/usr
/bin
:*) ;;
10 (*) export PATH
=$topdir/host_
$host/usr
/bin
:$PATH ;;
14 suffix
=${ADK_TARGET_SYSTEM}
15 if [ ! -z ${ADK_TARGET_LIBC} ];then
16 suffix
=${suffix}_
${ADK_TARGET_LIBC}
18 if [ ! -z ${ADK_TARGET_CPU_TYPE} ];then
19 suffix
=${suffix}_
${ADK_TARGET_CPU_TYPE}
21 if [ ! -z ${ADK_TARGET_ENDIAN_SUFFIX} ];then
22 suffix
=${suffix}${ADK_TARGET_ENDIAN_SUFFIX}
24 if [ ! -z ${ADK_TARGET_FLOAT} ];then
25 suffix
=${suffix}_
${ADK_TARGET_FLOAT}
27 if [ ! -z ${ADK_TARGET_ABI} ];then
28 suffix
=${suffix}_
${ADK_TARGET_ABI}
30 if [ ! -z ${ADK_TARGET_BINFMT} ];then
31 suffix
=${suffix}_
${ADK_TARGET_BINFMT}
34 rcconf
=$
(ls $topdir/root_
${suffix}/etc
/rc.conf
)
36 if [ ! -f $rcconf ];then
40 for service
in $
(grep ^ADK_RUNTIME_START_
$topdir/.config |
grep -v ADK_RUNTIME_START_SERVICES
);do
41 rcname
=$
(echo $service|
sed -e "s#ADK_RUNTIME_START_##")
42 mode
=$
(echo $rcname|cut
-d \
= -f 2)
43 rcname
=$
(echo $rcname|
sed -e "s#=.*##")
44 rcname
=$
(echo $rcname|
sed -e "s#^BUSYBOX_##")
45 rcname
=$
(echo $rcname|
tr '[:upper:]' '[:lower:]')
46 # workarounds where package name not equal to service name
47 if [ $rcname = "alsa_utils" ];then
50 if [ $rcname = "iptables" ];then
53 if [ $rcname = "nfs_utils_server" ];then
56 if [ $rcname = "openssh_server" ];then
59 if [ $mode = "m" ]; then
60 sed -i -e "s#^$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf
62 sed -i -e "s#^$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf