diff options
author | Jeff Bilyk <jbilyk@gmail.com> | 2011-08-07 11:26:13 -0400 |
---|---|---|
committer | Jeff Bilyk <jbilyk@gmail.com> | 2011-08-07 11:26:13 -0400 |
commit | cbd706597ffc9f231f28eca51ccc1b949f045ba2 (patch) | |
tree | e9681901fed604322e4831558ad66933f0ade855 /setup-alpine.in | |
parent | e489e81f7a9b37db7651941c8310d54016eeff22 (diff) | |
download | alpine-conf-cbd706597ffc9f231f28eca51ccc1b949f045ba2.zip |
setup-alpine: populate setup script answer file example
Diffstat (limited to 'setup-alpine.in')
-rwxr-xr-x | setup-alpine.in | 55 |
1 files changed, 44 insertions, 11 deletions
diff --git a/setup-alpine.in b/setup-alpine.in index 1de6ee8..ce9b138 100755 --- a/setup-alpine.in +++ b/setup-alpine.in @@ -51,16 +51,44 @@ fi if [ "$CREATEANSWERFILE" != "" ]; then touch "$CREATEANSWERFILE" || echo "Cannot touch file $CREATEANSWERFILE" cat <<__EOF__ > "$CREATEANSWERFILE" -KEYMAPOPTS="" -HOSTNAMEOPTS="" -INTERFACESOPTS="" -DNSOPTS="" -TIMEZONEOPTS="" -APKREPOSOPTS="" -SSHDOPTS="" -NTPOPTS="" -DISKOPTS="" -APKLBUOPTS="" +# Example answer file for setup-alpine script +# If you don't want to use a certain option, then comment it out + +# Use US layout with US variant +KEYMAPOPTS="us us" + +# Set hostname to alpine-test +HOSTNAMEOPTS="-n alpine-test" + +# Contents of /etc/network/interfaces +INTERFACESOPTS="auto lo +iface lo inet loopback + +auto eth0 +iface eth0 inet dhcp + hostname alpine-test +" + +# Search domain of example.com, Google public nameserver +DNSOPTS="-d example.com -n 8.8.8.8" + +# Set timezone to UTC +TIMEZONEOPTS="-z UTC" + +# Add a random mirror +APKREPOSOPTS="-r" + +# Install Openssh +SSHDOPTS="-c openssh" + +# Use openntpd +NTPOPTS="-c openntpd" + +# Use /dev/sda as a data disk +DISKOPTS="-m data /dev/sda" + +# Setup in /media/sdb1 +APKLBUOPTS="-m sdb1" __EOF__ echo "Answer file $CREATEANSWERFILE has been created. Please add or remove options as desired in that file" exit 0 @@ -75,7 +103,12 @@ fi $PREFIX/sbin/setup-keymap ${KEYMAPOPTS} $PREFIX/sbin/setup-hostname ${HOSTNAMEOPTS} -$PREFIX/sbin/setup-interfaces ${INTERFACEOPTS} + +if [ -n "$INTERFACESOPTS" ]; then + printf "$INTERFACESOPTS" | $PREFIX/sbin/setup-interfaces -i +else + $PREFIX/sbin/setup-interfaces +fi # setup up dns if no dhcp was configured grep '^iface.*dhcp' $ROOT/etc/network/interfaces > /dev/null ||\ |