Difference between revisions of "Alpine setup scripts"

From Alpine Linux
Jump to: navigation, search
(Created page)
 
(Update with new formatting)
Line 1: Line 1:
This page summarizes the low-level behavior of the /sbin/setup-* scripts on the Alpine ISO (and in a normal Alpine install).
+
This page summarizes the low-level behavior of the {{Path|/sbin/setup-*}} scripts on the Alpine ISO (and in a normal Alpine install).
  
 
==setup-alpine==
 
==setup-alpine==
  
This script accepts the following command-line arguments (you can run `setup-alpine -h` to see some of these entries).
+
This script accepts the following command-line arguments (you can run <code>setup-alpine -h</code> to see a usage message).
  
* -a       Create 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.
+
{{Gloss|-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 FILE Create a new "answer file", with default choices. You can edit the file and then invoke `setup-alpine -f FILE`.
+
{{Gloss|-c FILE|Create a new "answer file", with default choices. You can edit the file and then invoke <code>setup-alpine -f FILE</code>.}}
* -f FILE Use an existing "answer file", which may override some or all of the interactive prompts.
+
{{Gloss|-f FILE|Use an existing "answer file", which may override some or all of the interactive prompts.}}
* -q       Run in "quick mode" (not documented by `setup-alpine -h`). See below for details.
+
{{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 "answer file".
  
# `setup-keymap` [us us]
+
# <code>setup-keymap</code> [us us]
# `setup-hostname` [-n alpine-test]
+
# <code>setup-hostname</code> [-n alpine-test]
# `setup-interfaces` [-i < interfaces-file]  LINK
+
# <code>setup-interfaces</code> [-i < interfaces-file]  LINK
# `/etc/init.d/networking --quiet start &`
+
# <code>/etc/init.d/networking --quiet start &</code>
# if none of the networking interfaces were configured using dhcp, then: `setup-dns` [-d example.com -n "8.8.8.8 [more...]"]
+
# if none of the networking interfaces were configured using dhcp, then: <code>setup-dns</code> [-d example.com -n "8.8.8.8 [more...]"]
 
# set the root password
 
# set the root password
# if not in quick mode, then: setup-timezone [-z UTC]  LINK
+
# if not in quick mode, then: <code>setup-timezone</code> [-z UTC]  LINK
# enable the new hostname (`/etc/init.d/hostname --quiet restart`)
+
# 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 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
# extract the fully-qualified domain name and hostname from /etc/resolv.conf and `hostname`, and update /etc/hosts
+
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and <code>hostname</code>, and update {{Path|/etc/hosts}}
# `setup-apkrepos` [-r (to select a mirror randomly)]
+
# <code>setup-apkrepos</code> [-r (to select a mirror randomly)]
# if not in quick mode, then: `setup-sshd` [-c openssh | dropbear | none]
+
# if not in quick mode, then: <code>setup-sshd</code> [-c openssh | dropbear | none]
# if not in quick mode, then: `setup-ntp` [-c chrony | openntpd | none]
+
# if not in quick mode, then: <code>setup-ntp</code> [-c chrony | openntpd | none]
# if not in quick mode, then: `DEFAULT_DISK=none setup-disk -q` [-m data /dev/sda]  LINK
+
# if not in quick mode, then: <code>DEFAULT_DISK=none setup-disk -q</code> [-m data /dev/sda]  LINK
# if not in quick mode, and the selected disk mode was "data" instead of "sys", then: `setup-lbu` [/media/sdb1]
+
# if not in quick mode, and the selected disk mode was "data" instead of "sys", then: <code>setup-lbu</code> [/media/sdb1]
# if not in quick mode, and the selected disk mode was "data" instead of "sys", then: `setup-apkcache` [/media/sdb1/cache]
+
# if not in quick mode, and the selected disk mode was "data" instead of "sys", then: <code>setup-apkcache</code> [/media/sdb1/cache]
  
 
==setup-interfaces==
 
==setup-interfaces==
  
An interfaces file has the format of /etc/network/interfaces, such as:
+
An interfaces file has the format of {{Path|/etc/network/interfaces}}, such as:
  
    auto lo
+
auto lo
    iface lo inet loopback
+
iface lo inet loopback
 
+
    auto eth0
+
auto eth0
    iface eth0 inet dhcp
+
iface eth0 inet dhcp
        hostname alpine-test
+
    hostname alpine-test
  
 
==setup-timezone==
 
==setup-timezone==
Line 44: Line 44:
 
Can pre-select the timezone using either of these switches:
 
Can pre-select the timezone using either of these switches:
  
* -z <subfolder of /usr/share/zoneinfo>
+
* '''-z''' <subfolder of {{Path|/usr/share/zoneinfo}}>
* -p <POSIX TZ format>
+
* '''-p''' <POSIX TZ format>
  
==setup-disk==
+
 
 +
== setup-disk ==
  
 
To be added.
 
To be added.
  
==setup-bootable==
+
== setup-bootable ==
  
 
Must be run manually, to be added.
 
Must be run manually, to be added.
  
===setup-cryptswap===
+
== setup-cryptswap ==
  
 
Must be run manually, to be added.
 
Must be run manually, to be added.
  
===setup-xorg-base===
+
== setup-xorg-base ==
 
 
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
+
Installs the following packages: <code>xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev</code>.
  
===setup-gparted-desktop===
+
Additional packages can be supplied as arguments to <code>setup-xorg-base</code>. You might need, for example, some of: <code>xf86-input-synaptics xf86-video-<em>something</em> xinit</code>.
  
Uses openbox. Explanation to be added.
 
  
===setup-mta===
+
== Documentation needed ==
  
Uses ssmtp. Explanation to be added.
+
=== setup-gparted-desktop ===
  
===setup-alpine-web===
+
Uses openbox.
  
Explanation to be added.
+
=== setup-mta ===
  
===setup-acf===
+
Uses ssmtp.
  
Explanation to be added.
+
=== setup-alpine-web ===
  
===setup-ads===
+
=== setup-acf ===
  
Explanation to be added.
+
=== setup-ads ===

Revision as of 10:59, 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 FILE
Create a new "answer file", with default choices. You can edit the file and then invoke setup-alpine -f FILE.

-f FILE
Use an existing "answer file", 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 "answer file".

  1. setup-keymap [us us]
  2. setup-hostname [-n alpine-test]
  3. setup-interfaces [-i < interfaces-file] LINK
  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 [more...]"]
  6. set the root password
  7. if not in quick mode, then: setup-timezone [-z UTC] LINK
  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] LINK
  15. if not in quick mode, and the selected disk mode was "data" instead of "sys", then: setup-lbu [/media/sdb1]
  16. if not in quick mode, and the selected disk mode was "data" instead of "sys", then: setup-apkcache [/media/sdb1/cache]

setup-interfaces

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

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

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


setup-disk

To be added.

setup-bootable

Must be run manually, to be added.

setup-cryptswap

Must be run manually, to be added.

setup-xorg-base

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.

setup-mta

Uses ssmtp.

setup-alpine-web

setup-acf

setup-ads