Difference between revisions of "Alpine setup scripts"

From Alpine Linux
Jump to: navigation, search
(Tweaks)
(Tweaks)
Line 12: Line 12:
 
{{Gloss|-q|Run in "quick mode." See below for details. FIXME}}
 
{{Gloss|-q|Run in "quick mode." See below for details. FIXME}}
  
The script's behavior is to do the following, in order. Bracketed options represent extra configuration choices than can be supplied when running the auxiliary setup scripts manually, or by supplying an "answer file".
+
The script's behavior is to do the following, in order. Bracketed options represent extra configuration choices than can be supplied when running the auxiliary setup scripts manually, or by supplying an "answerfile".
  
 
# <code>setup-keymap</code> [us us]
 
# <code>setup-keymap</code> [us us]
Line 22: Line 22:
 
# if not in quick mode, then: [[#setup-timezone|setup-timezone]] [-z UTC | -z America/New_York | -p EST+5]
 
# if not in quick mode, then: [[#setup-timezone|setup-timezone]] [-z UTC | -z America/New_York | -p EST+5]
 
# enable the new hostname (<code>/etc/init.d/hostname --quiet restart</code>)
 
# enable the new hostname (<code>/etc/init.d/hostname --quiet restart</code>)
# add networking and urandom to the "boot" rc level, and acpid and cron to the "default" rc level, and start the boot and default rc services
+
# add <code>networking</code> and <code>urandom</code> to the '''boot''' rc level, and <code>acpid</code> and <code>cron</code> to the '''default''' rc level, and start the '''boot''' and '''default''' rc services
 
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and <code>hostname</code>, and update {{Path|/etc/hosts}}
 
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and <code>hostname</code>, and update {{Path|/etc/hosts}}
 
# <code>setup-apkrepos</code> [-r (to select a mirror randomly)]
 
# <code>setup-apkrepos</code> [-r (to select a mirror randomly)]
Line 28: Line 28:
 
# if not in quick mode, then: <code>setup-ntp</code> [-c chrony | openntpd | none]
 
# if not in quick mode, then: <code>setup-ntp</code> [-c chrony | openntpd | none]
 
# if not in quick mode, then: <code>DEFAULT_DISK=none</code> [[#setup-disk|setup-disk]] <code>-q</code> [-m data /dev/sda]
 
# if not in quick mode, then: <code>DEFAULT_DISK=none</code> [[#setup-disk|setup-disk]] <code>-q</code> [-m data /dev/sda]
# if not in quick mode, and the selected installation mode was "data" instead of "sys", then: <code>setup-lbu</code> [/media/sdb1]
+
# if installation mode selected during setup-disk was "data" instead of "sys", then: <code>setup-lbu</code> [/media/sdb1]
# if not in quick mode, and the selected installation mode was "data" instead of "sys", then: <code>setup-apkcache</code> [/media/sdb1/cache | none]
+
# if installation mode selected during setup-disk was "data" instead of "sys", then: <code>setup-apkcache</code> [/media/sdb1/cache | none]
  
 
== setup-interfaces ==
 
== setup-interfaces ==
 
 
:<code>setup-interfaces</code> [-i < interfaces-file]
 
:<code>setup-interfaces</code> [-i < interfaces-file]
  
Line 45: Line 44:
  
 
== setup-timezone ==
 
== setup-timezone ==
 
 
:<code>setup-timezone</code> [-z UTC | -z America/New_York | -p EST+5]
 
:<code>setup-timezone</code> [-z UTC | -z America/New_York | -p EST+5]
  
Line 57: Line 55:
 
:<code>DEFAULT_DISK=none setup-disk -q</code> [-m data /dev/sda]
 
:<code>DEFAULT_DISK=none setup-disk -q</code> [-m data /dev/sda]
  
To be added.
+
Explanation to be added.
  
 
== setup-bootable ==
 
== setup-bootable ==
 +
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
  
Must be run manually, to be added.
+
Its purpose is to create media that boots into tmpfs by copying the contents of an ISO onto a USB key, CF, or similar media.
 +
 
 +
Explanation to be added.
  
 
== setup-cryptswap ==
 
== setup-cryptswap ==
 +
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
 +
 +
Explanation to be added.
 +
  
Must be run manually, to be added.
 
  
 
== setup-xorg-base ==
 
== setup-xorg-base ==
 +
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
  
 
Installs the following packages: <code>xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev</code>.
 
Installs the following packages: <code>xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev</code>.
Line 77: Line 82:
  
 
=== setup-gparted-desktop ===
 
=== setup-gparted-desktop ===
 +
Uses openbox.
  
Uses openbox.
+
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
  
 
=== setup-mta ===
 
=== setup-mta ===
 +
Uses ssmtp.
  
Uses ssmtp.
+
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
  
 
=== setup-alpine-web ===
 
=== setup-alpine-web ===
 +
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
  
 
=== setup-acf ===
 
=== setup-acf ===
 +
This is a standalone script; it's not invoked by setup-alpine but must be run manually.
  
 
=== setup-ads ===
 
=== setup-ads ===
 +
This is a standalone script; it's not invoked by setup-alpine but must be run manually.

Revision as of 11:44, 4 March 2012

This page summarizes the low-level behavior of the /sbin/setup-* scripts on the Alpine ISO (and in a normal Alpine install).

setup-alpine

This script accepts the following command-line arguments (you can run setup-alpine -h to see a usage message).

-a
Create an overlay file: this creates a temporary directory and saves its location in ROOT; however, the script doesn't export this variable so I think this feature isn't currently functional.

-c answerfile
Create a new "answerfile", with default choices. You can edit the file and then invoke setup-alpine -f answerfile.
-f answerfile
Use an existing "answerfile", which may override some or all of the interactive prompts.

-q
Run in "quick mode." See below for details. FIXME

The script's behavior is to do the following, in order. Bracketed options represent extra configuration choices than can be supplied when running the auxiliary setup scripts manually, or by supplying an "answerfile".

  1. setup-keymap [us us]
  2. setup-hostname [-n alpine-test]
  3. setup-interfaces [-i < interfaces-file]
  4. /etc/init.d/networking --quiet start &
  5. if none of the networking interfaces were configured using dhcp, then: setup-dns [-d example.com -n "8.8.8.8 [...]"]
  6. set the root password
  7. if not in quick mode, then: setup-timezone [-z UTC | -z America/New_York | -p EST+5]
  8. enable the new hostname (/etc/init.d/hostname --quiet restart)
  9. add networking and urandom to the boot rc level, and acpid and cron to the default rc level, and start the boot and default rc services
  10. extract the fully-qualified domain name and hostname from /etc/resolv.conf and hostname, and update /etc/hosts
  11. setup-apkrepos [-r (to select a mirror randomly)]
  12. if not in quick mode, then: setup-sshd [-c openssh | dropbear | none]
  13. if not in quick mode, then: setup-ntp [-c chrony | openntpd | none]
  14. if not in quick mode, then: DEFAULT_DISK=none setup-disk -q [-m data /dev/sda]
  15. if installation mode selected during setup-disk was "data" instead of "sys", then: setup-lbu [/media/sdb1]
  16. if installation mode selected during setup-disk was "data" instead of "sys", then: setup-apkcache [/media/sdb1/cache | none]

setup-interfaces

setup-interfaces [-i < interfaces-file]

An interfaces file has the format of /etc/network/interfaces, such as:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    hostname alpine-test

setup-timezone

setup-timezone [-z UTC | -z America/New_York | -p EST+5]

Can pre-select the timezone using either of these switches:

  • -z subfolder of /usr/share/zoneinfo
  • -p POSIX TZ format

setup-disk

DEFAULT_DISK=none setup-disk -q [-m data /dev/sda]

Explanation to be added.

setup-bootable

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

Its purpose is to create media that boots into tmpfs by copying the contents of an ISO onto a USB key, CF, or similar media.

Explanation to be added.

setup-cryptswap

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

Explanation to be added.


setup-xorg-base

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

Installs the following packages: xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev.

Additional packages can be supplied as arguments to setup-xorg-base. You might need, for example, some of: xf86-input-synaptics xf86-video-something xinit.


Documentation needed

setup-gparted-desktop

Uses openbox.

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

setup-mta

Uses ssmtp.

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

setup-alpine-web

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

setup-acf

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

setup-ads

This is a standalone script; it's not invoked by setup-alpine but must be run manually.