summaryrefslogtreecommitdiffstats
path: root/lib/profiles/proteanos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/profiles/proteanos.sh')
-rw-r--r--lib/profiles/proteanos.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/profiles/proteanos.sh b/lib/profiles/proteanos.sh
index cddef89..822072a 100644
--- a/lib/profiles/proteanos.sh
+++ b/lib/profiles/proteanos.sh
@@ -35,6 +35,18 @@ sys /sys sysfs defaults
/dev /dev none bind
devpts /dev/pts devpts noexec,nosuid,gid=5,mode=0620
"
+prof_proteanos_install_service=\
+'#!/bin/sh /etc/rc.common
+
+start()
+{
+ log "Configuring packages"
+ printf "disabled\n" >/etc/rc.policy
+ opkg install $(opkg list-installed | cut -d " " -f 1)
+ printf "enabled\n" >/etc/rc.policy
+ rm "${SCRIPT}"
+}
+'
prof_proteanos_normalize_suite()
{
@@ -176,3 +188,14 @@ prof_proteanos_configure_system_native()
[ -e "${root}/etc/passwd" ] || printf \
'root::0:0:root:/root:/bin/sh\n' >"${root}/etc/passwd"
}
+
+prof_proteanos_configure_system_foreign()
+{
+ local root="${1}"
+
+ printf '%s' "${prof_proteanos_install_service}" >"${root}/etc/rc.d/S10install"
+ chmod 0755 "${root}/etc/rc.d/S10install"
+ printf 'proteanos\n' >"${root}/etc/hostname"
+ [ -e "${root}/etc/passwd" ] || printf \
+ 'root::0:0:root:/root:/bin/sh\n' >"${root}/etc/passwd"
+}