2 # This file is part of the OpenADK project. OpenADK is copyrighted
3 # material, please see the LICENCE file in the top-level directory.
6 if [ "$os" = "Darwin" ]; then
12 topdir
=$
(readlink
-nf $
(dirname $0)/..
2>/dev
/null ||
(cd $
(dirname $0)/..
; pwd -P))
15 suffix
=${ADK_TARGET_SYSTEM}
16 if [ ! -z ${ADK_TARGET_LIBC} ];then
17 suffix
=${suffix}_
${ADK_TARGET_LIBC}
19 if [ ! -z ${ADK_TARGET_CPU_TYPE} ];then
20 suffix
=${suffix}_
${ADK_TARGET_CPU_TYPE}
22 if [ ! -z ${ADK_TARGET_ENDIAN_SUFFIX} ];then
23 suffix
=${suffix}${ADK_TARGET_ENDIAN_SUFFIX}
25 if [ ! -z ${ADK_TARGET_FLOAT} ];then
26 suffix
=${suffix}_
${ADK_TARGET_FLOAT}
28 if [ ! -z ${ADK_TARGET_ABI} ];then
29 suffix
=${suffix}_
${ADK_TARGET_ABI}
31 if [ ! -z ${ADK_TARGET_BINFMT} ];then
32 suffix
=${suffix}_
${ADK_TARGET_BINFMT}
35 rcconf
=$
(ls $topdir/root_
${suffix}/etc
/rc.conf
)
37 if [ ! -f $rcconf ];then
41 for service
in $
(grep ^ADK_RUNTIME_START_
$topdir/.config |
grep -v ADK_RUNTIME_START_SERVICES
);do
42 rcname
=$
(echo $service|
sed -e "s#ADK_RUNTIME_START_##")
43 mode
=$
(echo $rcname|cut
-d \
= -f 2)
44 rcname
=$
(echo $rcname|
sed -e "s#=.*##")
45 rcname
=$
(echo $rcname|
sed -e "s#^BUSYBOX_##")
46 rcname
=$
(echo $rcname|
tr '[:upper:]' '[:lower:]')
47 # workarounds where package name not equal to service name
48 if [ $rcname = "alsa_utils" ];then
51 if [ $rcname = "iptables" ];then
54 if [ $rcname = "nfs_utils_server" ];then
57 if [ $rcname = "openssh_server" ];then
60 if [ $mode = "m" ]; then
61 $sed "s#^$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf
63 $sed "s#^$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf