summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-02-02 11:20:19 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-02-02 11:20:19 -0300
commit9ad92500fdf09bad8be7fa5b68e9c45414f77819 (patch)
tree31aa0d2454145f98aaba196b5561714fcff7ce8b
parent4b1f5945f1d544b5e25ef9a86ebc3d28515c233a (diff)
parentf31bbefc876aadbd9eee3750a1a1a606a2053028 (diff)
Merge git://projects.archlinux.org/initscripts
-rw-r--r--.gitignore5
-rw-r--r--Makefile18
-rw-r--r--PKGBUILD2
-rwxr-xr-xarch-tmpfiles57
-rw-r--r--functions23
-rw-r--r--hostname.5.txt34
-rw-r--r--locale.conf.5.txt40
-rwxr-xr-xnetwork8
-rw-r--r--rc.conf107
-rw-r--r--rc.conf.5.txt232
-rwxr-xr-xrc.shutdown2
-rwxr-xr-xrc.sysinit65
-rw-r--r--tmpfiles.conf17
-rw-r--r--vconsole.conf.5.txt58
14 files changed, 506 insertions, 162 deletions
diff --git a/.gitignore b/.gitignore
index 5200eb7..e365ecb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,8 @@
tags
*.tar.xz*
+hostname.5
+locale.conf.5
+vconsole.conf.5
+rc.conf.5
+rc.d.8
pkg/
diff --git a/Makefile b/Makefile
index 064af0c..ba1a798 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ DIRS := \
/usr/lib/initscripts \
/etc/bash_completion.d \
/usr/share/zsh/site-functions \
+ /usr/share/man/man5 \
/usr/share/man/man8
all: doc
@@ -29,6 +30,7 @@ install: installdirs doc
install -m755 -t $(DESTDIR)/etc/profile.d locale.sh
install -m755 -t $(DESTDIR)/usr/sbin rc.d
install -m644 -t ${DESTDIR}/usr/share/man/man8 rc.d.8
+ install -m644 -t ${DESTDIR}/usr/share/man/man5 rc.conf.5 locale.conf.5 vconsole.conf.5 hostname.5
install -m755 -t $(DESTDIR)/usr/lib/initscripts arch-tmpfiles arch-sysctl
install -m644 tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d/arch.conf
install -m644 -T bash-completion $(DESTDIR)/etc/bash_completion.d/rc.d
@@ -37,10 +39,22 @@ install: installdirs doc
rc.d.8: rc.d.8.txt
a2x -d manpage -f manpage rc.d.8.txt
-doc: rc.d.8
+rc.conf.5: rc.conf.5.txt
+ a2x -d manpage -f manpage rc.conf.5.txt
+
+locale.conf.5: locale.conf.5.txt
+ a2x -d manpage -f manpage locale.conf.5.txt
+
+vconsole.conf.5: vconsole.conf.5.txt
+ a2x -d manpage -f manpage vconsole.conf.5.txt
+
+hostname.5: hostname.5.txt
+ a2x -d manpage -f manpage hostname.5.txt
+
+doc: rc.d.8 rc.conf.5 locale.conf.5 vconsole.conf.5 hostname.5
clean:
- rm -f rc.d.8
+ rm -f rc.d.8 rc.conf.5 locale.conf.5 vconsole.conf.5 hostname.5
tar:
git archive HEAD --prefix=initscripts-$(VER)/ | xz > initscripts-$(VER).tar.xz
diff --git a/PKGBUILD b/PKGBUILD
index 94439df..950fc84 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ conflicts=('initscripts')
provides=('initscripts=9999')
backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown)
makedepends=('asciidoc')
-depends=('glibc' 'bash' 'grep' 'coreutils' 'udev>=174' 'iproute2'
+depends=('glibc' 'bash' 'grep' 'coreutils' 'udev>=177' 'iproute2'
'ncurses' 'kbd' 'findutils' 'sysvinit')
optdepends=('net-tools: legacy networking support'
'bridge-utils: Network bridging support'
diff --git a/arch-tmpfiles b/arch-tmpfiles
index f133a40..3b94885 100755
--- a/arch-tmpfiles
+++ b/arch-tmpfiles
@@ -25,18 +25,36 @@ checkparams() {
fi
# uid must be numeric or a valid user name
- if [[ $uid && $uid != +([[:digit:]]) ]] && ! getent passwd "$uid" >/dev/null; then
+ if [[ $uid ]] && ! getent passwd "$uid" >/dev/null; then
return 1
fi
# gid must be numeric or a valid group name
- if [[ $gid && $gid != +([[:digit:]]) ]] && ! getent group "$gid" >/dev/null; then
+ if [[ $gid ]] && ! getent group "$gid" >/dev/null; then
return 1
fi
return 0
}
+relabel() {
+ local -a paths=($1)
+ local mode=$2 uid=$3 gid=$4
+
+ if ! checkparams 4 "$@"; then
+ warninvalid
+ return
+ fi
+
+ for path in "${paths[@]}"; do
+ if [[ -e $path ]]; then
+ [[ $uid != '-' ]] && chown $CHOPTS "$uid" "$path"
+ [[ $gid != '-' ]] && chgrp $CHOPTS "$gid" "$path"
+ [[ $mode != '-' ]] && chmod $CHOPTS "$mode" "$path"
+ fi
+ done
+}
+
_f() {
# Create a file if it doesn't exist yet
local path=$1 mode=$2 uid=$3 gid=$4
@@ -87,17 +105,18 @@ _D() {
# Create or empty a directory
local path=$1 mode=$2 uid=$3 gid=$4
- (( CREATE )) || return 0
-
if ! checkparams 4 "$@"; then
warninvalid
return
fi
- if [[ -d $path ]]; then
- find "$path" -mindepth 1 -maxdepth 1 -xdev -print0 | xargs -r0 rm -rf
+ if [[ -d $path ]] && (( REMOVE )); then
+ find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+ fi
+
+ if (( CREATE )); then
+ install -d -m"$mode" -o"$uid" -g"$gid" "$path"
fi
- install -d -m"$mode" -o"$uid" -g"$gid" "$path"
}
_p() {
@@ -167,6 +186,28 @@ _R() {
done
}
+_z() {
+ # Set ownership, access mode and relabel security context of a file or
+ # directory if it exists. Lines of this type accept shell-style globs in
+ # place of normal path names.
+ local -a paths=($1)
+ local mode=$2 uid=$3 gid=$4
+
+ (( CREATE )) || return 0
+
+ relabel "$@"
+}
+
+_Z() {
+ # Recursively set ownership, access mode and relabel security context of a
+ # path and all its subdirectories (if it is a directory). Lines of this type
+ # accept shell-style globs in place of normal path names.
+
+ (( CREATE )) || return 0
+
+ CHOPTS=-R relabel "$@"
+}
+
shopt -s nullglob
declare -i CREATE=0 REMOVE=0 CLEAN=0 error=0 LINENO=0
@@ -241,7 +282,7 @@ while read -d '' fragment; do
[[ ${line[3]} = '-' ]] && line[3]=0
[[ ${line[4]} = '-' ]] && line[4]=0
- _${line[0]} "${line[@]:1}"
+ "_${line[@]}"
done <"$FILE"
done < <(printf '%s\0' "${!fragments[@]}" | sort -z)
diff --git a/functions b/functions
index 464ff1f..edeecac 100644
--- a/functions
+++ b/functions
@@ -171,9 +171,14 @@ stat_die() {
}
status() {
+ [[ $1 = '-v' ]] && { local v=1; shift; }
stat_busy "$1"
shift
- "$@" &>/dev/null
+ if (( v )); then
+ "$@"
+ else
+ "$@" &>/dev/null
+ fi
local ret=$?
(( ret == 0 )) && stat_done || stat_fail
return $ret
@@ -353,11 +358,11 @@ udevd_modprobe() {
stat_done
# Load modules from the MODULES array defined in rc.conf
- [[ -f /proc/modules ]] && (( ${#MODULES[*]} )) &&
- status "Loading User-specified Modules" modprobe -ab "${MODULES[@]}"
+ (( ${#MODULES[*]} )) &&
+ status -v "Loading User-specified Modules" modprobe -ab "${MODULES[@]}"
status "Waiting for UDev uevents to be processed" \
- udevadm settle --timeout=${UDEV_TIMEOUT:-30}
+ udevadm settle
run_hook "$1_udevsettled"
@@ -401,7 +406,7 @@ read_crypttab() {
}
set_timezone() {
- local tz=$1 zonefile=/usr/share/zoneinfo/$tz
+ local tz=$1 zonefile=/usr/share/zoneinfo/$1
[[ $tz ]] || return 1
@@ -455,7 +460,7 @@ fsck_reboot() {
echo "* *"
echo "* Please repair manually and reboot. Note that the root *"
echo "* file system is currently mounted read-only. To remount *"
- echo "* it read-write type: mount -n -o remount,rw / *"
+ echo "* it read-write type: mount -o remount,rw / *"
echo "* When you exit the maintenance shell the system will *"
echo "* reboot automatically. *"
echo "* *"
@@ -465,7 +470,7 @@ fsck_reboot() {
fi
echo "Automatic reboot in progress..."
umount -a
- mount -n -o remount,ro /
+ mount -o remount,ro /
reboot -f
exit 0
}
@@ -497,8 +502,8 @@ umount_all() {
continue
fi
- mounts+=("$target")
- done < <(findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac)
+ mounts=("$target" "${mounts[@]}")
+ done < <(findmnt -mrunRo TARGET,FSTYPE,OPTIONS /)
umount -r "${mounts[@]}"
diff --git a/hostname.5.txt b/hostname.5.txt
new file mode 100644
index 0000000..f141768
--- /dev/null
+++ b/hostname.5.txt
@@ -0,0 +1,34 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet:
+/////
+hostname(5)
+===========
+
+NAME
+----
+hostname - Local host name configuration file
+
+SYNOPSIS
+--------
+*/etc/hostname*
+
+DESCRIPTION
+-----------
+The /etc/hostname file configures the name of the local system that is set during boot. It
+should contain a single newline-terminated host name string. The host name may be a free-form string up to 64 characters in length,
+however it is recommended that it consists only of 7bit ASCII lower-case characters and no spaces or dots, and limits itself to the
+format allowed for DNS domain name labels, even though this is not a strict requirement.
+
+In Arch Linux the HOSTNAME variable in /etc/rc.conf is checked for the host name as well, however only as fallback.
+
+HISTORY
+-------
+The simple configuration file format of /etc/hostname originates from Debian GNU/Linux.
+
+SEE ALSO
+--------
+systemd.hostname(5), hostname(1), hostname(7), rc.conf(5)
+
+AUTHORS
+-------
+Original by Lennart Poettering, adapted to Arch Linux by Tom Gundersen.
diff --git a/locale.conf.5.txt b/locale.conf.5.txt
new file mode 100644
index 0000000..15f1e5f
--- /dev/null
+++ b/locale.conf.5.txt
@@ -0,0 +1,40 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet:
+/////
+locale.conf(5)
+==============
+
+NAME
+----
+locale.conf - configuration file for locale settings
+
+SYNOPSIS
+--------
+*/etc/locale.conf*
+
+DESCRIPTION
+-----------
+The /etc/locale.conf file configures system-wide locale settings.
+
+The basic file format of locale.conf is a newline-separated list of environment-like shell-compatible variable assignments. It is
+possible to source the configuration from shell scripts, however, beyond mere variable assignments no shell features are supported,
+allowing applications to read the file without implementing a shell compatible execution engine.
+
+The locale settings configured in /etc/locale.conf are system-wide and are inherited by every service or user, unless overridden or
+unset by individual programs or individual users. To avoid services inheriting the locale settings on sysvinit systems, the
+DAEMON_LOCALE variable in rc.conf can be set to "no".
+
+In Arch /etc/rc.conf is checked for locale configuration as well, however only as fallback.
+
+OPTIONS
+-------
+The following locale settings may be set using /etc/locale.conf: *LANG=*, *LANGUAGE=*, *LC_CTYPE=*, *LC_NUMERIC=*, *LC_TIME=*, *LC_COLLATE=*,
+*LC_MONETARY=*, *LC_MESSAGES=*, *LC_PAPER=*, *LC_NAME=*, *LC_ADDRESS=*, *LC_TELEPHONE=*, *LC_MEASUREMENT=*, *LC_IDENTIFICATION=*. Note that *LC_ALL* may not be be configured in this file. For details about the meaning and semantics of these settings, refer to locale(7). The LANG variable overrides LOCALE from /etc/rc.conf.
+
+SEE ALSO
+--------
+systemd.locale.conf(5), locale(7), rc.conf(5)
+
+AUTHORS
+-------
+Original by Lennart Poettering, adapted to Arch Linux by Tom Gundersen.
diff --git a/network b/network
index b94d170..d22b5dd 100755
--- a/network
+++ b/network
@@ -51,7 +51,7 @@ network_up() {
network_down() {
have_interface "$interface" || return 1
- if [[ -f /var/run/dhcpcd-$interface.pid ]]; then
+ if [[ -f /run/dhcpcd-$interface.pid ]]; then
dhcpcd -k $interface || return 1
else
ip addr flush dev $interface || return 1
@@ -81,8 +81,8 @@ ifup() {
if [[ $ifcfg = dhcp ]]; then
# remove the .pid file if it exists
- rm -f /var/run/dhcpcd-${1}.pid >/dev/null 2>&1
- rm -f /var/run/dhcpcd-${1}.cache >/dev/null 2>&1
+ rm -f /run/dhcpcd-${1}.pid >/dev/null 2>&1
+ rm -f /run/dhcpcd-${1}.cache >/dev/null 2>&1
dhcpcd $DHCPCD_ARGS ${1}
else
ifconfig $ifcfg
@@ -114,7 +114,7 @@ ifdown() {
return 1
fi
- if [[ $ifcfg = dhcp && -f /var/run/dhcpcd-${1}.pid ]]; then
+ if [[ $ifcfg = dhcp && -f /run/dhcpcd-${1}.pid ]]; then
dhcpcd -k ${1} >/dev/null 2>&1
fi
# Always bring the interface itself down
diff --git a/rc.conf b/rc.conf
index c9dcb46..b3b1698 100644
--- a/rc.conf
+++ b/rc.conf
@@ -1,88 +1,30 @@
#
# /etc/rc.conf - Main Configuration for Parabola GNU/Linux-Libre
#
+# See 'man 5 rc.conf' for more details
+#
-# -----------------------------------------------------------------------
# LOCALIZATION
-# -----------------------------------------------------------------------
-#
-# LOCALE: available languages can be listed with the 'locale -a' command
-# LANG in /etc/locale.conf takes precedence
-# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
-# startup and during the boot process. If set to 'no', the C locale is used.
-# HARDWARECLOCK: set to "", "UTC" or "localtime", any other value will result
-# in the hardware clock being left untouched (useful for virtualization)
-# Note: Using "localtime" is discouraged, using "" makes hwclock fall back
-# to the value in /var/lib/hwclock/adjfile
-# TIMEZONE: timezones are found in /usr/share/zoneinfo
-# Note: if unset, the value in /etc/localtime is used unchanged
-# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
-# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
-# CONSOLEMAP: found in /usr/share/kbd/consoletrans
-# USECOLOR: use ANSI color sequences in startup messages
-#
-LOCALE="en_US.UTF-8"
-DAEMON_LOCALE="no"
-HARDWARECLOCK="UTC"
-TIMEZONE="Canada/Pacific"
-KEYMAP="us"
+# ------------
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
CONSOLEFONT=
CONSOLEMAP=
+LOCALE=
+DAEMON_LOCALE="yes"
USECOLOR="yes"
-# -----------------------------------------------------------------------
# HARDWARE
-# -----------------------------------------------------------------------
-#
-# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
-# Replace every !module by an entry as on the following line in a file in
-# /etc/modprobe.d:
-# blacklist module
-# See "man modprobe.conf" for details.
-#
+# --------
MODULES=()
-
-# Udev settle timeout (default to 30)
-UDEV_TIMEOUT=30
-
-# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"
-
-# Scan for BTRFS volumes at startup
USEBTRFS="no"
-
-# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
-# -----------------------------------------------------------------------
# NETWORKING
-# -----------------------------------------------------------------------
-#
-# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
-#
-HOSTNAME="myhost"
-
-# Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
-#
-# Wired network setup
-# - interface: name of device (required)
-# - address: IP address (leave blank for DHCP)
-# - netmask: subnet mask (ignored for DHCP) (optional, defaults to 255.255.255.0)
-# - broadcast: broadcast address (ignored for DHCP) (optional)
-# - gateway: default route (ignored for DHCP)
-#
-# Static IP example
-# interface=eth0
-# address=192.168.0.2
-# netmask=255.255.255.0
-# broadcast=192.168.0.255
-# gateway=192.168.0.1
-#
-# DHCP example
-# interface=eth0
-# address=
-# netmask=
-# gateway=
+# ----------
+HOSTNAME=
interface=
address=
@@ -90,34 +32,9 @@ netmask=
broadcast=
gateway=
-# Setting this to "yes" will skip network shutdown.
-# This is required if your root device is on NFS.
NETWORK_PERSIST="no"
-# Enable these netcfg profiles at boot-up. These are useful if you happen to
-# need more advanced network features than the simple network service
-# supports, such as multiple network configurations (ie, laptop users)
-# - set to 'menu' to present a menu during boot-up (dialog package required)
-# - prefix an entry with a ! to disable it
-#
-# Network profiles are found in /etc/network.d
-#
-# This requires the netcfg package
-#
-#NETWORKS=(main)
-
-# -----------------------------------------------------------------------
# DAEMONS
-# -----------------------------------------------------------------------
-#
-# Daemons to start at boot-up (in this order)
-# - prefix a daemon with a ! to disable it
-# - prefix a daemon with a @ to start it up in the background
-#
-# If you are sure nothing else touches your hardware clock (such as ntpd or
-# a dual-boot), you might want to enable 'hwclock'. Note that this will only
-# make a difference if the hwclock program has been calibrated correctly.
-#
-# If you use a network filesystem you should enable 'netfs'.
+# -------
#
DAEMONS=(metalog network crond)
diff --git a/rc.conf.5.txt b/rc.conf.5.txt
new file mode 100644
index 0000000..099e69f
--- /dev/null
+++ b/rc.conf.5.txt
@@ -0,0 +1,232 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet:
+/////
+rc.conf(5)
+==========
+
+NAME
+----
+rc.conf - Arch Linux main configuration file
+
+SYNOPSIS
+--------
+/etc/rc.conf
+
+DESCRIPTION
+-----------
+The /etc/rc.conf file is the system configuration file for Arch-specific
+settings. The format is bash. It contains several commonly-edited settings such
+as timezone; keymap; kernel modules; daemons to load at start-up; etc. It is
+split up in a few sections to categorize configuration settings: localization,
+hardware, networking and daemons.
+
+LOCALIZATION[[L]]
+-----------------
+*TIMEZONE=*
+
+Specifies the timezone. The setting takes effect on boot by ensuring that /etc/localtime is a symlink
+to the correct zoneinfo file. Possible timezones are the relative path to a zoneinfo file starting
+from the directory /usr/share/zoneinfo. For example, a German timezone would be Europe/Berlin,
+which refers to the file /usr/share/zoneinfo/Europe/Berlin.
+
+Note: if empty, /etc/localtime is not changed. This is useful if /etc/localtime is maintained manually
+or by a third-party tool; or if there is no reason to change it from what was set during install.
+
+Default: empty
+
+*HARDWARECLOCK=*
+
+How to interpret/update the hardware clock. (used by hwclock)
+
+Options:
+
+ - empty: fall back to the value in /var/lib/hwclock/adjtime, which defaults to UTC. This is recommended
+ as other users of hwclock might change the adjtime file and hence cause rc.conf and adjtime to be out of sync.
+ - "UTC": most robust, allows operating systems to abstract local time and ease DST.
+ - "localtime": apply timezone (and DST) in hardwareclock: discouraged.
+ Choose this if you dualboot with an OS which cannot handle UTC BIOS times correctly, like Windows (note
+ that recent Windows'es can use UTC, which is preferable).
+ - any other value will result in the hardware clock being left untouched (useful for virtualization)
+
+Default: empty
+
+*KEYMAP=*
+
+Defines the keymap to load with the loadkeys program on boot. Possible keymaps are
+found in /usr/share/kbd/keymaps. Please note that this setting is only valid for
+your TTYs, not any graphical window managers or X. KEYMAP in /etc/vconsole.conf takes
+precedence.
+
+Default: empty
+
+*CONSOLEFONT=*
+
+Defines the console font to load with the setfont program on boot.
+Possible fonts are found in /usr/share/kbd/consolefonts (only needed for non-US).
+FONT in /etc/vconsole.conf takes precedence.
+
+Default: empty
+
+*CONSOLEMAP=*
+
+Defines the console map to load with the setfont program on boot. Possible maps are found in
+/usr/share/kbd/consoletrans. Set this to a map suitable for the appropriate locale (8859-1 for Latin1,
+for example) if you're using an UTF-8 locale and use programs that generate 8-bit output. If you're
+using X11 for everyday work, don't bother, as it only affects the output of Linux console applications.
+FONT_MAP in /etc/vconsole.conf takes precedence.
+
+Default: empty
+
+*LOCALE=*
+
+This sets your system language, which will be used by all i18n-friendly applications and utilities.
+See `locale -a` (or locale.gen) for available options. LANG in /etc/locale.conf takes precedence.
+If unset, it falls back to the C locale.
+
+Default: empty
+
+*DAEMON_LOCALE=*
+
+ - If set to 'yes', use $LOCALE as the locale during daemon startup and during the boot process.
+ - If set to 'no', the C locale is used.
+
+Default: "yes"
+
+*USECOLOR=*
+
+Use ANSI color sequences in startup messages
+
+Default: "yes"
+
+HARDWARE[[H]]
+-------------
+*MODULES=*
+
+Modules to load at boot-up. To blacklist modules, see "man modprobe.conf".
+
+Default: ().
+
+*USEDMRAID=*
+
+Scan for FakeRAID (dmraid) Volumes at startup.
+
+Default: "no"
+
+*USEBTRFS=*
+
+Scan for BTRFS volumes at startup.
+
+Default: "no"
+
+*USELVM=*
+
+Scan for LVM volume groups at startup, required if you use LVM.
+
+Default: "no"
+
+NETWORKING[[N]]
+---------------
+*HOSTNAME=*
+
+Hostname of machine. Should also be put in /etc/hosts. The contents of
+/etc/hostname (if not empty) takes precedence.
+
+Default: empty
+
+The following settings help you setting up a wired network.
+
+*interface=*
+
+Name of device. Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
+
+Default: empty
+
+Required for manual configuration as well as DHCP.
+
+*address=*
+
+IP address.
+
+Default: empty
+
+Required for manual configuration, empty for DHCP.
+
+*netmask=*
+
+Subnet mask.
+
+Default: empty (which means 255.255.255.0)
+
+Optional for manual configuration, ignored for DHCP.
+
+*broadcast=*
+
+Broadcast address.
+
+Default: empty
+
+Optional for manual configuration, ignored for DHCP.
+
+*gateway=*
+
+Default route.
+
+Default: empty
+
+Required for manual configuration, ignored for DHCP.
+
+*Static IP example*
+
+ interface=eth0
+ address=192.168.0.2
+ netmask=255.255.255.0
+ broadcast=192.168.0.255
+ gateway=192.168.0.1
+
+*DHCP example*
+
+ interface=eth0
+ address=
+ netmask=
+ gateway=
+
+The following options might be needed for advanced use-cases.
+
+*NETWORK_PERSIST=*
+
+Setting this to "yes" will skip network shutdown. This is required if your root device is on NFS.
+
+Default: "no"
+
+*NETWORKS=*
+
+Enable these netcfg profiles at boot-up. These replace the network
+configuration above and are useful if you happen to need more advanced
+network features than the simple network service supports,
+such as multiple network configurations (ie, laptop users).
+ - set to 'menu' to present a menu during boot-up (dialog package required)
+ - prefix an entry with a ! to disable it
+
+Network profiles are found in /etc/network.d
+There is a template file included there that can be used to create
+new profiles. This requires the netcfg package.
+
+DAEMONS[[D]]
+------------
+*DAEMONS=*
+
+Daemons to start at boot-up (in this order)
+ - prefix a daemon with a ! to disable it
+ - prefix a daemon with a @ to start it up in the background
+
+If you are sure nothing else touches your hardware clock (such as ntpd or
+a dual-boot), you might want to enable 'hwclock'. Note that this will only
+make a difference if the hwclock program has been calibrated correctly.
+
+If you use a network filesystem you should enable 'netfs'.
+
+Default: (syslog-ng network crond)
+
+AUTHORS
+-------
+Written by Dieter Plaetinck, Tom Gundersen and others.
diff --git a/rc.shutdown b/rc.shutdown
index 4b513f7..54a1e9a 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -123,7 +123,7 @@ if [[ -x /run/initramfs/shutdown ]]; then
else
status "Remounting Root Filesystem Read-only" \
- mount -n -o remount,ro /
+ mount -o remount,ro /
# Power off or reboot
printsep
diff --git a/rc.sysinit b/rc.sysinit
index e53defc..66cba96 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -13,23 +13,22 @@ printhl "You're booting into a /libre/ version of Archlinux"
printsep
# mount /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm (the api filesystems)
-mountpoint -q /proc || mount -n -t proc proc /proc -o nosuid,noexec,nodev
-mountpoint -q /sys || mount -n -t sysfs sys /sys -o nosuid,noexec,nodev
-mountpoint -q /run || mount -n -t tmpfs run /run -o mode=0755,nosuid,nodev
-mountpoint -q /dev || mount -n -t devtmpfs udev /dev -o mode=0755,nosuid ||
- mount -n -t tmpfs udev /dev -o mode=0755,nosuid
+mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev
+mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev
+mountpoint -q /run || mount -t tmpfs run /run -o mode=0755,nosuid,nodev
+mountpoint -q /dev || mount -t devtmpfs dev /dev -o mode=0755,nosuid
mkdir -p -m 1777 /run/lock
mkdir -p /dev/{pts,shm}
-mountpoint -q /dev/pts || mount -n /dev/pts &>/dev/null ||
+mountpoint -q /dev/pts || mount /dev/pts &>/dev/null ||
mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
-mountpoint -q /dev/shm || mount -n /dev/shm &>/dev/null ||
+mountpoint -q /dev/shm || mount /dev/shm &>/dev/null ||
mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev
if [[ ! -e /run/initramfs/fsck-root ]]; then
# remount root ro to allow for fsck later on, we remount now to
# make sure nothing can open files rw on root which would block a remount
findmnt / --options ro &>/dev/null ||
- status "Mounting Root Read-Only" mount -n -o remount,ro /
+ status "Mounting Root Read-Only" mount -o remount,ro /
fi
run_hook sysinit_start
@@ -41,6 +40,10 @@ if [[ ! -a /usr/lib ]] ; then
printf "${C_FAIL}/usr is not mounted. This is not supported.${C_OTHER}\n"
fi
+if [[ ! $(grep devtmpfs /proc/filesystems) ]] ; then
+ printf "${C_FAIL}Your kernel does not have devtmpfs support. This is not supported.${C_OTHER}\n"
+fi
+
HWCLOCK_PARAMS="--systz"
case $HARDWARECLOCK in
"") ;;
@@ -53,18 +56,9 @@ if [[ $HWCLOCK_PARAMS ]]; then
stat_busy "Adjusting system time and setting kernel timezone"
# enable rtc access
modprobe -q -a rtc-cmos rtc genrtc
- # If devtmpfs is used, the required RTC device already exists now
- # Otherwise, create whatever device is available
- if ! [[ -c /dev/rtc || -c /dev/rtc0 ]]; then
- for dev in /sys/class/rtc/rtc0/dev /sys/class/misc/rtc/dev; do
- [[ -e $dev ]] || continue
- IFS=: read -r major minor < "$dev"
- mknod /dev/rtc c $major $minor
- done
- fi
# Adjust the system time for timezone offset if rtc is not in UTC
- # 1. Make creation time on udev nodes sane (FS#8665)
+ # 1. Make creation time on device nodes sane (FS#8665)
# 2. Filesystem checks can depend on system time
# 3. This also sets the kernel time zone, used by e.g. vfat
# If TIMEZONE is not set in rc.conf, the timezone stored in /etc/localtime
@@ -182,25 +176,25 @@ fi
# Check filesystems
[[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-- -f"
declare -r FORCEFSCK
-run_hook sysinit_prefsck
-if [[ -x $(type -P fsck) ]]; then
- stat_busy "Checking Filesystems"
- fsck_all >|"${FSCK_OUT:-/dev/stdout}" 2>|"${FSCK_ERR:-/dev/stdout}"
- declare -r fsckret=$?
- (( fsckret <= 1 )) && stat_done || stat_fail
-else
- declare -r fsckret=0
-fi
-run_hook sysinit_postfsck
-# Single-user login and/or automatic reboot if needed
-fsck_reboot $fsckret
+if [[ -n $FORCEFSCK ]] || { [[ ! -f /fastboot ]] && ! in_array fastboot $(< /proc/cmdline); }; then
+ run_hook sysinit_prefsck
+ if [[ -x $(type -P fsck) ]]; then
+ stat_busy "Checking Filesystems"
+ fsck_all >|"${FSCK_OUT:-/dev/stdout}" 2>|"${FSCK_ERR:-/dev/stdout}"
+ declare -r fsckret=$?
+ (( fsckret <= 1 )) && stat_done || stat_fail
+ else
+ declare -r fsckret=0
+ fi
+ run_hook sysinit_postfsck
+
+ # Single-user login and/or automatic reboot if needed
+ fsck_reboot $fsckret
+fi
status "Remounting Root" \
- mount -n -o remount /
-
-# force linkage of /etc/mtab to the kernel
-[[ -L /etc/mtab ]] || ln -sf /proc/self/mounts /etc/mtab
+ mount -o remount /
# now mount all the local filesystems
run_hook sysinit_premount
@@ -225,6 +219,9 @@ RANDOM_SEED=/var/lib/misc/random-seed
# Remove leftover files
remove_leftover
+if [[ -s /etc/hostname ]]; then
+ HOSTNAME=$(< /etc/hostname)
+fi
if [[ $HOSTNAME ]]; then
stat_busy "Setting Hostname: $HOSTNAME"
echo "$HOSTNAME" >| /proc/sys/kernel/hostname && stat_done || stat_fail
diff --git a/tmpfiles.conf b/tmpfiles.conf
index 90deb9d..a63ca07 100644
--- a/tmpfiles.conf
+++ b/tmpfiles.conf
@@ -2,19 +2,20 @@
# /usr/lib/tmpfiles.d/arch.conf
#
-D /tmp 1777 root root
-D /run/daemons 0755 root root
+D /tmp 1777 root root 10d
+d /run/daemons 0755 root root -
-d /tmp/.X11-unix 1777 root root
-d /tmp/.ICE-unix 1777 root root
-d /tmp/.XIM-unix 1777 root root
-d /tmp/.font-unix 1777 root root
-d /tmp/.Test-unix 1777 root root
+d /tmp/.X11-unix 1777 root root 10d
+d /tmp/.ICE-unix 1777 root root 10d
+d /tmp/.XIM-unix 1777 root root 10d
+d /tmp/.font-unix 1777 root root 10d
+d /tmp/.Test-unix 1777 root root 10d
-F /run/utmp 0664 root utmp
+F /run/utmp 0664 root utmp -
r /tmp/.X[0-9]-lock
r /etc/nologin
r /etc/shutdownpid
r /forcefsck
+r /fastboot
diff --git a/vconsole.conf.5.txt b/vconsole.conf.5.txt
new file mode 100644
index 0000000..456db58
--- /dev/null
+++ b/vconsole.conf.5.txt
@@ -0,0 +1,58 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet:
+/////
+vconsole.conf(5)
+================
+
+NAME
+----
+vconsole.conf - configuration file for the virtual console
+
+SYNOPSIS
+--------
+*/etc/vconsole.conf*
+
+DESCRIPTION
+-----------
+The /etc/vconsole.conf file configures the virtual console, i.e. keyboard mapping and console font.
+
+The basic file format of the vconsole.conf is a newline-separated list environment-like shell-compatible variable assignments. It is
+possible to source the configuration from shell scripts, however, beyond mere variable assignments no shell features are supported,
+allowing applications to read the file without implementing a shell compatible execution engine.
+
+In Arch /etc/rc.conf is checked for vconsole configuration as well as described below, however only as fallback.
+
+OPTIONS
+-------
+The following options are understood:
+
+*KEYMAP=*
+//, KEYMAP_TOGGLE=
+//The KEYMAP_TOGGLE= can be used to configured a second toggle keymap and is by default unset.
+// KEYMAP= defaults to us if not set.
+
+ Configures the key mapping table of for they keyboard. Overriding KEYMAP from rc.conf.
+
+*FONT=*, *FONT_MAP=*
+//, FONT_UNIMAP=
+// the unicode font map
+// FONT= defaults to latarcyrheb-sun16.
+
+ Configures the console font and the console map. Overriding respectively CONSOLEFONT and CONSOLEMAP from rc.conf.
+
+EXAMPLE
+-------
+*Example 1. German keyboard and console*
+
+/etc/vconsole.conf:
+
+ KEYMAP=de-latin1
+ FONT=latarcyrheb-sun16
+
+SEE ALSO
+--------
+systemd.vconsole.conf(5), loadkeys(1), setfont(8), rc.conf(5)
+
+AUTHORS
+-------
+Original by Lennart Poettering, adapted to Arch Linux by Tom Gundersen.