diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/profile.sh | 7 | ||||
-rw-r--r-- | lib/profiles/proteanos.sh | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/profile.sh b/lib/profile.sh index a8beedd..846b22d 100644 --- a/lib/profile.sh +++ b/lib/profile.sh @@ -122,3 +122,10 @@ profile_get_fstab() "prof_${profile}_get_fstab" "${arch}" "${plat}" } + +profile_configure_system_native() +{ + local root="${1}" + + "prof_${profile}_configure_system_native" "${root}" +} diff --git a/lib/profiles/proteanos.sh b/lib/profiles/proteanos.sh index 4f52611..cddef89 100644 --- a/lib/profiles/proteanos.sh +++ b/lib/profiles/proteanos.sh @@ -17,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +use opkg + # TODO: This should be replaced with a prof_proteanos_validate_archplat() # function that gets valid architectures and platforms from the package archive # (which pro-archman needs to list in the distribution). @@ -161,3 +163,16 @@ prof_proteanos_get_fstab() ;; esac } + +prof_proteanos_configure_system_native() +{ + local root="${1}" + + printf 'disabled\n' >"${root}/etc/rc.policy" + opkg_install_all + printf 'enabled\n' >"${root}/etc/rc.policy" + [ -r /etc/resolv.conf ] && cp /etc/resolv.conf "${root}/etc" + [ -r /etc/hostname ] && cp /etc/hostname "${root}/etc" + [ -e "${root}/etc/passwd" ] || printf \ + 'root::0:0:root:/root:/bin/sh\n' >"${root}/etc/passwd" +} |