diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-08-21 12:01:14 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-08-21 12:01:14 (EDT) |
commit | 2e1898e771c1ab91796aa162b45353e79b4e23ce (patch) | |
tree | f5ffd02b447974852223665df6773ceb7ae016b6 /lib/profiles | |
parent | fb26038e26edfc57e5408cd39446da293d837692 (diff) |
profile_configure_system_foreign(): New function
Diffstat (limited to 'lib/profiles')
-rw-r--r-- | lib/profiles/proteanos.sh | 23 |
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" +} |