summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbusybox.pkg/postinst7
-rw-r--r--src.etc/rc.common3
2 files changed, 10 insertions, 0 deletions
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index 99b8006..c499f03 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -5,6 +5,13 @@ if [ "x${1}" = 'xconfigure' ]; then
update-alternatives --install "${link}" "${name}" \
"${link}.busybox" "${prio}"
done </usr/share/busybox/alternatives
+ if ! [ -e /etc/rc.policy ]; then
+ if [ "x$(cat /etc/proteanos_plat)" = 'xdev' ]; then
+ printf 'disabled' >/etc/rc.policy
+ else
+ printf 'enabled' >/etc/rc.policy
+ fi
+ fi
if [ -e /usr/share/busybox/init-scripts ]; then
while read script; do
"/etc/init.d/${script}" enable
diff --git a/src.etc/rc.common b/src.etc/rc.common
index 8ccb6f7..42f33d6 100644
--- a/src.etc/rc.common
+++ b/src.etc/rc.common
@@ -32,6 +32,9 @@ main()
fi
if [ "x${ALL_CMDS#* ${action} }" != "x${ALL_CMDS}" ]; then
+ if [ "x${action}" = 'xstart' ] && [ -e /etc/rc.policy ]; then
+ [ "x$(cat /etc/rc.policy)" = 'disabled' ] && return 0
+ fi
${action}
es=${?}
log_end ${es}