diff options
Diffstat (limited to 'miniprokit.sh')
-rwxr-xr-x | miniprokit.sh | 20 |
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= |