diff options
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x | arch-binfmt | 45 | ||||
-rwxr-xr-x | arch-sysctl | 29 | ||||
-rwxr-xr-x | arch-tmpfiles | 297 | ||||
-rw-r--r-- | binfmt.d.5.txt | 57 | ||||
-rw-r--r-- | functions | 52 | ||||
-rw-r--r-- | hostname.5.txt | 34 | ||||
-rw-r--r-- | locale.conf.5.txt | 40 | ||||
-rw-r--r-- | rc.conf.5.txt | 8 | ||||
-rwxr-xr-x | rc.multi | 4 | ||||
-rwxr-xr-x | rc.shutdown | 13 | ||||
-rwxr-xr-x | rc.sysinit | 55 | ||||
-rw-r--r-- | tmpfiles.conf | 16 | ||||
-rw-r--r-- | vconsole.conf.5.txt | 58 |
15 files changed, 49 insertions, 683 deletions
@@ -6,26 +6,13 @@ DIRS := \ /etc/rc.d/functions.d \ /etc/logrotate.d \ /etc/profile.d \ - /usr/sbin \ - /etc/tmpfiles.d \ /usr/lib/tmpfiles.d \ - /etc/binfmt.d \ - /usr/lib/binfmt.d \ - /etc/sysctl.d \ - /usr/lib/sysctl.d \ - /usr/lib/initscripts \ + /usr/sbin \ /usr/share/bash-completion/completions \ /usr/share/zsh/site-functions \ /usr/share/man/man5 \ /usr/share/man/man8 -MAN_PAGES := \ - rc.d.8 \ - rc.conf.5 \ - locale.conf.5 \ - vconsole.conf.5 \ - hostname.5 - all: doc installdirs: @@ -39,10 +26,9 @@ install: installdirs doc install -m755 -t $(DESTDIR)/etc/rc.d hwclock network netfs install -m755 -t $(DESTDIR)/etc/profile.d locale.sh install -m755 -t $(DESTDIR)/usr/sbin rc.d - install -m644 -t $(DESTDIR)/usr/share/man/man5 $(filter %.5, $(MAN_PAGES)) - install -m644 -t $(DESTDIR)/usr/share/man/man8 $(filter %.8, $(MAN_PAGES)) - install -m755 -t $(DESTDIR)/usr/lib/initscripts arch-tmpfiles arch-sysctl arch-binfmt - install -m644 tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d/arch.conf + install -m644 -t $(DESTDIR)/usr/share/man/man5 rc.conf.5 + install -m644 -t $(DESTDIR)/usr/share/man/man8 rc.d.8 + install -m644 tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d/initscripts.conf install -m644 -T bash-completion $(DESTDIR)/usr/share/bash-completion/completions/rc.d install -m644 -T zsh-completion $(DESTDIR)/usr/share/zsh/site-functions/_rc.d @@ -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>=182' 'iproute2' +depends=('glibc' 'bash' 'grep' 'coreutils' 'systemd-tools' 'iproute2' 'ncurses' 'kbd' 'findutils' 'sysvinit') optdepends=('net-tools: legacy networking support' 'bridge-utils: Network bridging support' diff --git a/arch-binfmt b/arch-binfmt deleted file mode 100755 index 91468ef..0000000 --- a/arch-binfmt +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# -# /usr/lib/initscripts/arch-binfmt -# -# Configure additional binary formats at boot -# - -shopt -s nullglob - -declare -a binfmt_d -# files given has argv supersede config files -if (( $# > 0 )); then - for arg; do [[ -r "$arg" ]] && binfmt_d+=("$arg"); done -else - binfmt_d=( - /usr/lib/binfmt.d/*.conf - /etc/binfmt.d/*.conf - /run/binfmt.d/*.conf - ) -fi - -# check there is file to load -(( ${#binfmt_d[@]} > 0 )) || exit 1 - -# mount binfmt_misc if api filesystem is missing -mountpoint -q /proc/sys/fs/binfmt_misc || - mount -t binfmt_misc binfmt /proc/sys/fs/binfmt_misc - -# files declared later in the binfmt_d array will override earlier -# Example: `/etc/binfmt.d/foo.conf' supersedes `/usr/lib/binfmt.d/foo.conf'. -declare -A fragments -for path in "${binfmt_d[@]}"; do - [[ -f $path ]] && fragments[${path##*/}]=$path -done - -for path in "${fragments[@]}"; do - while read -r line; do - [[ ${line:0:1} == '#' ]] && continue - printf "%s" "$line" > /proc/sys/fs/binfmt_misc/register - done < "$path" -done - -: - -# vim: set ts=2 sw=2 noet: diff --git a/arch-sysctl b/arch-sysctl deleted file mode 100755 index f73f1f0..0000000 --- a/arch-sysctl +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# /usr/lib/initscripts/arch-sysctl -# -# Load sysctl configuration files following -# http://0pointer.de/public/systemd-man/sysctl.d.html -# - -shopt -s nullglob - -declare -a sysctl_d=( - /usr/lib/sysctl.d/*.conf - /etc/sysctl.d/*.conf - /run/sysctl.d/*.conf - /etc/sysctl.conf -) -declare -A fragments - -# files declared later in the sysctl_d array will override earlier -# Example: `/etc/sysctl.d/foo.conf' supersedes `/usr/lib/sysctl.d/foo.conf'. -for path in "${@:-${sysctl_d[@]}}"; do - [[ -f $path ]] && fragments[${path##*/}]=$path -done - -for path in "${fragments[@]}"; do - sysctl -q -p"$path" -done - -# vim: set ts=2 sw=2 noet: diff --git a/arch-tmpfiles b/arch-tmpfiles deleted file mode 100755 index 9355fdc..0000000 --- a/arch-tmpfiles +++ /dev/null @@ -1,297 +0,0 @@ -#!/bin/bash -# -# /usr/lib/initscripts/arch-tmpfiles -# -# Control creation, deletion, and cleaning of volatile and temporary files -# - -warninvalid() { - printf "arch-tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE" - (( ++error )) -} >&2 - -checkparams() { - local parmreq=$1; shift - local path=$1 mode=$2 uid=$3 gid=$4 - - # parmcount must be >= parmreq - if (( $# < parmreq )); then - return 1 - fi - - # mode must be valid octal and 3 or 4 digits - if [[ $mode && ! $mode =~ ^[0-7]{3,4}$ ]]; then - return 1 - fi - - # uid must be numeric or a valid user name - # don't try to resolve numeric IDs in case they don't exist - if [[ $uid ]]; then - if [[ $uid != +([0-9]) ]] && ! getent passwd "$uid" >/dev/null; then - return 1 - fi - fi - - # gid must be numeric or a valid group name - # don't try to resolve numeric IDs in case they don't exist - if [[ $gid ]]; then - if [[ $gid != +([0-9]) ]] && ! getent group "$gid" >/dev/null; then - return 1 - fi - 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 - - (( CREATE )) || return 0 - - if ! checkparams 4 "$@"; then - warninvalid - return - fi - - if [[ ! -e $path ]]; then - install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path" - fi -} - -_F() { - # Create or truncate a file - local path=$1 mode=$2 uid=$3 gid=$4 - - (( CREATE )) || return 0 - - if ! checkparams 4 "$@"; then - warninvalid - return - fi - - install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path" -} - -_d() { - # Create a directory if it doesn't exist yet - local path=$1 mode=$2 uid=$3 gid=$4 - - (( CREATE )) || return 0 - - if ! checkparams 4 "$@"; then - warninvalid - return - fi - - if [[ ! -d "$path" ]]; then - install -d -m"$mode" -o"$uid" -g"$gid" "$path" - fi -} - -_D() { - # Create or empty a directory - local path=$1 mode=$2 uid=$3 gid=$4 - - if ! checkparams 4 "$@"; then - warninvalid - return - fi - - 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 -} - -_p() { - # Create a named pipe (FIFO) if it doesn't exist yet - local path=$1 mode=$2 uid=$3 gid=$4 - - (( CREATE )) || return 0 - - if ! checkparams 4 "$@"; then - warninvalid - return - fi - - if [[ ! -p "$path" ]]; then - mkfifo -m$mode "$path" - chown "$uid:$gid" "$path" - fi -} - -_x() { - # Ignore a path during cleaning. Use this type to exclude paths from clean-up as - # controlled with the Age parameter. Note that lines of this type do not - # influence the effect of r or R lines. Lines of this type accept shell-style - # globs in place of of normal path names. - : - # XXX: we don't implement this -} - -_r() { - # Remove a file or directory if it exists. This may not be used to remove - # non-empty directories, use R for that. Lines of this type accept shell-style - # globs in place of normal path names. - local path - local -a paths=($1) - - (( REMOVE )) || return 0 - - if ! checkparams 1 "$@"; then - warninvalid - return - fi - - for path in "${paths[@]}"; do - if [[ -f $path ]]; then - rm -f "$path" - elif [[ -d $path ]]; then - rmdir "$path" - fi - done -} - -_R() { - # Recursively remove 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. - local path - local -a paths=($1) - - (( REMOVE )) || return 0 - - if ! checkparams 1 "$@"; then - warninvalid - return - fi - - for path in "${paths[@]}"; do - [[ -d $path ]] && rm -rf --one-file-system "$path" - 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 -declare FILE= -declare -A fragments -declare -a tmpfiles_d=( - /usr/lib/tmpfiles.d/*.conf - /etc/tmpfiles.d/*.conf - /run/tmpfiles.d/*.conf -) - -while (( $# )); do - case $1 in - --create) CREATE=1 ;; - --remove) REMOVE=1 ;; - esac - shift -done - -if (( !(CREATE + REMOVE) )); then - printf 'usage: %s [--create] [--remove]\n' "${0##*/}" - exit 1 -fi - -# directories declared later in the tmpfiles_d array will override earlier -# directories, on a per file basis. -# Example: `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'. -for path in "${@:-${tmpfiles_d[@]}}"; do - [[ -f $path ]] && fragments[${path##*/}]=${path%/*} -done - -# catch errors in functions so we can exit with something meaningful -set -E -trap '(( ++error ))' ERR - -# loop through the gathered fragments, sorted globally by filename. -# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf' -while read -d '' fragment; do - LINENUM=0 - - printf -v FILE '%s/%s' "${fragments[$fragment]}" "$fragment" - - ### FILE FORMAT ### - # XXX: We ignore the final 'Age' parameter - # 0 1 2 3 4 5 - # Type Path Mode UID GID Age - # d /run/user 0755 root root 10d - - # omit read's -r flag to honor escapes here, so that whitespace can be - # escaped for paths. We will _not_ honor quoted paths. - while read -a line; do - (( ++LINENUM )) - - # skip over comments and empty lines - if (( ! ${#line[*]} )) || [[ ${line[0]:0:1} = '#' ]]; then - continue - fi - - # whine about invalid entries - if ! type -t _${line[0]} >/dev/null; then - warninvalid - continue - fi - - # fall back on defaults when parameters are passed as '-' - if [[ ${line[2]} = '-' ]]; then - case ${line[0]} in - p|f|F) line[2]=0644 ;; - d|D) line[2]=0755 ;; - esac - fi - [[ ${line[3]} = '-' ]] && line[3]='root' - [[ ${line[4]} = '-' ]] && line[4]='root' - - "_${line[@]}" - done <"$FILE" -done < <(printf '%s\0' "${!fragments[@]}" | sort -z) - -exit $error - -# vim: set ts=2 sw=2 noet: diff --git a/binfmt.d.5.txt b/binfmt.d.5.txt deleted file mode 100644 index 2925256..0000000 --- a/binfmt.d.5.txt +++ /dev/null @@ -1,57 +0,0 @@ -///// -vim:set ts=4 sw=4 syntax=asciidoc noet: -///// -binfmt.d(5) -=========== - -NAME ----- -binfmt.d - Configure additional binary formats at boot - -SYNOPSIS --------- -/usr/lib/binfmt.d/*.conf - -/etc/binfmt.d/*.conf - -/run/binfmt.d/*.conf - -DESCRIPTION ------------ -*initscripts* uses files from the above directories to configure additional -binary formats to register during boot in the kernel. - -CONFIGURATION FORMAT --------------------- -Each file contains a list of binfmt_misc kernel binary format rules. -Consult *binfmt_misc.txt*[1] for more information on registration of -additional binary formats and how to write rules. - -Empty lines and lines beginning with ; and # are ignored. Note that this -means you may not use ; and # as delimiter in binary format rules. - -Each configuration file is named in the style of <program>.conf. Files in -/etc/ overwrite files with the same name in /usr/lib/. Files in /run -overwrite files with the same name in /etc/ and /usr/lib/. Packages -should install their configuration files in /usr/lib/, files in /etc/ are -reserved for the local administration, which possibly decides to -overwrite the configurations installed from packages. All files are -sorted by filename in alphabetical order, regardless in which of the -directories they reside, to ensure that a specific configuration file -takes precedence over another file with an alphabetically later name. - -EXAMPLE -------- -*Example 1. /etc/binfmt.d/wine.conf example:* - - # Start WINE on Windows executables - :DOSWin:M::MZ::/usr/bin/wine: - -NOTES ------ -*1. binfmt_misc.txt:* - http://www.kernel.org/doc/Documentation/binfmt_misc.txt - -AUTHORS -------- -Original by Lennart Poettering, adapted to Arch Linux by Sébastien Luttringer. @@ -344,11 +344,25 @@ kill_all() { fi } +load_modules() { + local rc=0 + + /usr/lib/systemd/systemd-modules-load + rc=$? + + if (( ${#MODULES[*]} )); then + modprobe -ab "${MODULES[@]}" + (( rc += $? )) + fi + + return $rc +} + # Start/trigger UDev, load MODULES and settle UDev udevd_modprobe() { # $1 = where we are being called from. # This is used to determine which hooks to run. - status "Starting UDev Daemon" /usr/lib/udev/udevd --daemon + status "Starting UDev Daemon" /usr/lib/systemd/systemd-udevd --daemon run_hook "$1_udevlaunched" @@ -357,9 +371,8 @@ udevd_modprobe() { udevadm trigger --action=add --type=devices stat_done - # Load modules from the MODULES array defined in rc.conf - (( ${#MODULES[*]} )) && - status -v "Loading User-specified Modules" modprobe -ab "${MODULES[@]}" + # Load modules from the MODULES array and modules-load.d + status -v "Loading User-specified Modules" load_modules status "Waiting for UDev uevents to be processed" \ udevadm settle @@ -494,13 +507,11 @@ NETFS="nfs,nfs4,smbfs,cifs,codafs,ncpfs,shfs,fuse,fuseblk,glusterfs,davfs,fuse.g # Check local filesystems fsck_all() { - [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-f" - - if [[ ! -n $FORCEFSCK ]] && { [[ -f /fastboot ]] || in_array fastboot $(< /proc/cmdline); }; then + if [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline); then + FORCEFSCK="-f" + elif [[ -f /fastboot ]] || in_array fastboot $(< /proc/cmdline); then return 0 - fi - - if [[ -e /run/initramfs/root-fsck ]]; then + elif [[ -e /run/initramfs/root-fsck ]]; then IGNORE_MOUNTED="-M" fi @@ -578,8 +589,7 @@ umount_all() { } remove_leftover() { - stat_busy "Removing Leftover Files" - /usr/lib/initscripts/arch-tmpfiles --create --remove && stat_done || stat_fail + status -v 'Removing Leftover Files' systemd-tmpfiles --create --remove # move from static /var/{run,lock} to /run if [[ ! -L /var/lock ]]; then rm -rf /var/lock @@ -658,24 +668,6 @@ if (( RC_FUNCTIONS_HOOK_FUNCS_DEFINED != 1 )); then declare -r RC_FUNCTIONS_HOOK_FUNCS_DEFINED=1 fi -# Function for setting console font if required -set_consolefont() { - [[ $CONSOLEFONT ]] || return 0 - stat_busy "Loading Console Font: $CONSOLEFONT" - #CONSOLEMAP in UTF-8 shouldn't be used - [[ $CONSOLEMAP && ${LOCALE,,} =~ utf ]] && CONSOLEMAP="" - local i - for i in /dev/tty[0-9]*; do - setfont ${CONSOLEMAP:+-m "${CONSOLEMAP}"} \ - "$CONSOLEFONT" -C ${i} &>/dev/null - done - if (( $? )); then - stat_fail - else - stat_done - fi -} - if [[ $DAEMON_LOCALE = [yY][eE][sS] ]]; then export LANG=${LOCALE:-C} if [[ -r /etc/locale.conf ]]; then diff --git a/hostname.5.txt b/hostname.5.txt deleted file mode 100644 index 0618855..0000000 --- a/hostname.5.txt +++ /dev/null @@ -1,34 +0,0 @@ -///// -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 systems 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 deleted file mode 100644 index 8651c40..0000000 --- a/locale.conf.5.txt +++ /dev/null @@ -1,40 +0,0 @@ -///// -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 systems /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/rc.conf.5.txt b/rc.conf.5.txt index 7352d6a..89d6e5f 100644 --- a/rc.conf.5.txt +++ b/rc.conf.5.txt @@ -102,7 +102,8 @@ HARDWARE[[H]] ------------- *MODULES=* -Modules to load at boot-up. To blacklist modules, see "man modprobe.d". +Modules to load at boot-up. To blacklist modules, see "man modprobe.d". See also +"man modules-load.d". Default: (). @@ -218,6 +219,11 @@ If you use a network filesystem you should enable 'netfs'. Default: (syslog-ng network crond) +SEE ALSO +-------- + +hostname(5), vconsole.conf(5), locale.conf(5), hwclock(8) + AUTHORS ------- Written by Dieter Plaetinck, Tom Gundersen and others. @@ -9,10 +9,10 @@ run_hook multi_start # Load sysctl config files -[[ -x /usr/lib/initscripts/arch-sysctl ]] && /usr/lib/initscripts/arch-sysctl +/usr/lib/systemd/systemd-sysctl # Load additional binary formats -[[ -x /usr/lib/initscripts/arch-binfmt ]] && /usr/lib/initscripts/arch-binfmt +/usr/lib/systemd/systemd-binfmt # Start daemons for daemon in "${DAEMONS[@]}"; do diff --git a/rc.shutdown b/rc.shutdown index ec30d56..d0d8405 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -19,18 +19,7 @@ run_hook shutdown_start stop_all_daemons -stat_busy "Saving Random Seed" - RANDOM_SEED=/var/lib/misc/random-seed - install -TDm 0600 /dev/null $RANDOM_SEED - POOL_FILE=/proc/sys/kernel/random/poolsize - if [[ -r $POOL_FILE ]]; then - read POOL_SIZE < $POOL_FILE - (( POOL_SIZE /= 8 )) - else - POOL_SIZE=512 - fi - dd if=/dev/urandom of=$RANDOM_SEED count=1 bs=$POOL_SIZE &>/dev/null -stat_done +status 'Saving Random Seed' /usr/lib/systemd/systemd-random-seed save [[ $TIMEZONE ]] && status "Configuring Time Zone" set_timezone "$TIMEZONE" @@ -21,9 +21,11 @@ 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 /dev/pts &>/dev/null || - mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec + mount -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec mountpoint -q /dev/shm || mount /dev/shm &>/dev/null || - mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev + mount -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev +mountpoint -q /proc/sys/fs/binfmt_misc || mount /proc/sys/fs/binfmt_misc &>/dev/null || + mount -t binfmt_misc binfmt /proc/sys/fs/binfmt_misc if [[ ! -e /run/initramfs/fsck-root ]]; then # remount root ro to allow for fsck later on, we remount now to @@ -37,43 +39,6 @@ run_hook sysinit_start # log all console messages bootlogd -p /run/bootlogd.pid -if [[ -s /etc/locale.conf ]]; then - parse_envfile /etc/locale.conf "LANG" - [[ $LANG ]] && LOCALE=$LANG -fi -if [[ ${LOCALE,,} =~ utf ]]; then - stat_busy "Setting Consoles to UTF-8 mode" - # UTF-8 consoles are default since 2.6.24 kernel - # this code is needed not only for older kernels, - # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8. - for i in /dev/tty[0-9]*; do - kbd_mode -u < ${i} - printf "\e%%G" > ${i} - done - echo 1 >| /sys/module/vt/parameters/default_utf8 - stat_done -else - stat_busy "Setting Consoles to legacy mode" - # make non-UTF-8 consoles work on 2.6.24 and newer kernels - for i in /dev/tty[0-9]*; do - kbd_mode -a < ${i} - printf "\e%%@" > ${i} - done - echo 0 >| /sys/module/vt/parameters/default_utf8 - stat_done -fi - -if [[ -s /etc/vconsole.conf ]]; then - parse_envfile /etc/vconsole.conf "${vconsolevars[@]}" - [[ $FONT ]] && CONSOLEFONT=$FONT - [[ $FONT_MAP ]] && CONSOLEMAP=$FONT_MAP -fi -[[ $KEYMAP ]] && - status "Loading Keyboard Map: $KEYMAP" loadkeys -q $KEYMAP - -# Set console font if required -set_consolefont - if [[ ! -a /usr/lib ]] ; then printf "${C_FAIL}/usr is not mounted. This is not supported.${C_OTHER}\n" fi @@ -109,6 +74,13 @@ fi # Start/trigger UDev, load MODULES and settle UDev udevd_modprobe sysinit +if [[ -s /etc/locale.conf ]]; then + parse_envfile /etc/locale.conf "LANG" + [[ $LANG ]] && LOCALE=$LANG +fi + +status 'Configuring Virtual Consoles' /usr/lib/systemd/systemd-vconsole-setup + # bring up the loopback interface [[ -d /sys/class/net/lo ]] && status "Bringing up loopback interface" ip link set up dev lo @@ -166,10 +138,7 @@ status "Activating Swap" swapon -a [[ $TIMEZONE ]] && status "Configuring Time Zone" set_timezone "$TIMEZONE" -RANDOM_SEED=/var/lib/misc/random-seed -[[ -f $RANDOM_SEED ]] && - status "Initializing Random Seed" \ - cp $RANDOM_SEED /dev/urandom +status 'Initializing Random Seed' /usr/lib/systemd/systemd-random-seed load # Remove leftover files remove_leftover diff --git a/tmpfiles.conf b/tmpfiles.conf index a63ca07..8f99a99 100644 --- a/tmpfiles.conf +++ b/tmpfiles.conf @@ -2,20 +2,4 @@ # /usr/lib/tmpfiles.d/arch.conf # -D /tmp 1777 root root 10d d /run/daemons 0755 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 - - -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 deleted file mode 100644 index 456db58..0000000 --- a/vconsole.conf.5.txt +++ /dev/null @@ -1,58 +0,0 @@ -///// -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. |