summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/profile.sh7
-rw-r--r--lib/profiles/proteanos.sh23
2 files changed, 30 insertions, 0 deletions
diff --git a/lib/profile.sh b/lib/profile.sh
index 846b22d..b37b6f7 100644
--- a/lib/profile.sh
+++ b/lib/profile.sh
@@ -129,3 +129,10 @@ profile_configure_system_native()
"prof_${profile}_configure_system_native" "${root}"
}
+
+profile_configure_system_foreign()
+{
+ local root="${1}"
+
+ "prof_${profile}_configure_system_foreign" "${root}"
+}
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"
+}