#!/bin/sh PROGRAM=setup-alpine VERSION=@VERSION@ PREFIX= . $PREFIX/lib/libalpine.sh while getopts "ah" opt ; do case $opt in a) ARCHIVE=yes;; h) usage;; *) usage;; esac done shift `expr $OPTIND - 1` if [ "$ARCHIVE" ] ; then echo "Creating an Alpine overlay" init_tmpdir ROOT else PKGADD=apk_add fi $PREFIX/sbin/setup-keymap $PREFIX/sbin/setup-hostname $PREFIX/sbin/setup-interfaces # setup up dns if no dhcp was configured grep '^iface.*dhcp' $ROOT/etc/network/interfaces > /dev/null ||\ $PREFIX/sbin/setup-dns # set root password [ -z "$NOCOMMIT" ] && while ! passwd ; do echo "Please retry." ; done rc-update -q add networking boot # enable new hostname /etc/init.d/hostname --quiet restart # start up the services rc boot rc default