| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 | #!/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))host=$(gcc -dumpmachine)case :$PATH: in(*:$topdir/host_$host/usr/bin:*) ;;(*) export PATH=$topdir/host_$host/usr/bin:$PATH ;;esac. $topdir/.configsuffix=${ADK_TARGET_SYSTEM}if [ ! -z ${ADK_TARGET_LIBC} ];then	suffix=${suffix}_${ADK_TARGET_LIBC}fiif [ ! -z ${ADK_TARGET_CPU_TYPE} ];then	suffix=${suffix}_${ADK_TARGET_CPU_TYPE}fiif [ ! -z ${ADK_TARGET_ENDIAN_SUFFIX} ];then	suffix=${suffix}${ADK_TARGET_ENDIAN_SUFFIX}fiif [ ! -z ${ADK_TARGET_FLOAT} ];then	suffix=${suffix}_${ADK_TARGET_FLOAT}fiif [ ! -z ${ADK_TARGET_ABI} ];then	suffix=${suffix}_${ADK_TARGET_ABI}fiif [ ! -z ${ADK_TARGET_BINFMT} ];then	suffix=${suffix}_${ADK_TARGET_BINFMT}fiif [ ! -z ${ADK_TARGET_INSTRUCTION_SET} ];then	suffix=${suffix}_${ADK_TARGET_INSTRUCTION_SET}fiif [ -z ${ADK_TARGET_WITH_MMU} ];then	suffix=${suffix}_nommufircconf=$(ls $topdir/root_${suffix}/etc/rc.conf)if [ ! -f $rcconf ];then	exit 0fifor service in $(grep ^ADK_RUNTIME_START_ $topdir/.config |grep -v ADK_RUNTIME_START_SERVICES);do	rcname=$(echo $service|sed -e "s#ADK_RUNTIME_START_##")	mode=$(echo $rcname|cut -d \= -f 2)	rcname=$(echo $rcname| sed -e "s#=.*##")	rcname=$(echo $rcname| sed -e "s#^BUSYBOX_##")	rcname=$(echo $rcname| tr '[:upper:]' '[:lower:]')	# workarounds where package name not equal to service name	if [ $rcname = "alsa_utils" ];then		rcname=amixer	fi	if [ $rcname = "iptables" ];then		rcname=firewall	fi	if [ $rcname = "nfs_utils_server" ];then		rcname=nfsd	fi	if [ $rcname = "openssh_server" ];then		rcname=openssh	fi	if [ $mode = "m" ]; then	  sed -i -e "s#^$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf	else	  sed -i -e "s#^$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf	fidone
 |