summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-08 14:28:11 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-08 14:28:11 (EDT)
commitb2600736ac8db08428ac1d220f62e064939b4a47 (patch)
tree1e8b1104ea5fe1a09b04f8f6d9fffb2a758b3606
parent9b9c070eccaec8e76fba9d5ce45592ddc0ab3429 (diff)
miniprokit.sh: Only configure packages for dev.
Also write /etc/resolv.conf and /etc/hostname depending on the platform.
-rwxr-xr-xminiprokit.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/miniprokit.sh b/miniprokit.sh
index abb7710..381daf4 100755
--- a/miniprokit.sh
+++ b/miniprokit.sh
@@ -201,10 +201,14 @@ cmd_install()
EOF
- configure_pkgs "${root}"
-
- [ -r /etc/resolv.conf ] && cp /etc/resolv.conf "${root}/etc"
- [ -r /etc/hostname ] && cp /etc/hostname "${root}/etc"
+ if [ "x${plat}" = 'xdev' ]; then
+ chroot "${root}" /bin/sh -c \
+ 'opkg install $(opkg list-installed | cut -d " " -f 1)'
+ [ -r /etc/resolv.conf ] && cp /etc/resolv.conf "${root}/etc"
+ [ -r /etc/hostname ] && cp /etc/hostname "${root}/etc"
+ else
+ printf 'proteanos\n' >"${root}/etc/hostname"
+ fi
}
get_pkg()
@@ -274,14 +278,6 @@ get_pkg()
rm -f "${root}/${filename}"
}
-configure_pkgs()
-{
- local root="${1}"
-
- chroot "${root}" /bin/sh -c \
- 'opkg install $(opkg list-installed | cut -d " " -f 1)'
-}
-
cmd_shell()
{
local root=