summaryrefslogtreecommitdiffstats
path: root/setup-alpine.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-05-06 09:53:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-05-06 09:53:36 +0000
commitec0c7a74bbf5824adc4efa54e1f91984ac870a8e (patch)
tree7f5a8763836154b10c8325629b493ebc67ead7e6 /setup-alpine.in
parentf590563940559429ffe77094473d12361937852d (diff)
downloadalpine-conf-ec0c7a74bbf5824adc4efa54e1f91984ac870a8e.tar.bz2
alpine-conf-ec0c7a74bbf5824adc4efa54e1f91984ac870a8e.tar.xz
move to .in files
Diffstat (limited to 'setup-alpine.in')
-rw-r--r--setup-alpine.in52
1 files changed, 52 insertions, 0 deletions
diff --git a/setup-alpine.in b/setup-alpine.in
new file mode 100644
index 0000000..418b7f4
--- /dev/null
+++ b/setup-alpine.in
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+PROGRAM=setup-alpine
+VERSION=2.0_alpha7
+
+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
+
+for i in devfs dmesg; do
+ rc-update add $i sysinit
+done
+
+# add some boot services
+for i in hwclock modules sysctl hostname syslog bootmisc; do
+ rc-update add $i boot
+done
+
+for i in networking; do
+ rc-update add $i default
+done
+
+# start up the services
+rc sysinit
+rc boot
+rc default