summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-08-31 22:15:17 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-08-31 22:15:17 -0300
commita1642a5964035040dcbf07af01418375e45bb128 (patch)
treeeaccd090fe7f046a241d9897544b2354a36b8a80
parent2fb1be996d4d8d459f4b4953a84af63f981b0bf0 (diff)
parentc67d598d1cb2c346c83b72449bf20ee5dfea9ae7 (diff)
Merge branch 'master' of git://projects.archlinux.org/initscripts2012.09.1
Conflicts: Makefile parabola.7.txt
-rw-r--r--Makefile11
-rw-r--r--functions29
-rw-r--r--locale.sh83
-rwxr-xr-xnetwork4
-rw-r--r--parabola.7.txt81
-rw-r--r--rc.conf.5.txt13
-rwxr-xr-xrc.sysinit53
7 files changed, 44 insertions, 230 deletions
diff --git a/Makefile b/Makefile
index d2668db..777c7ff 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,6 @@ DIRS := \
/etc/rc.d \
/etc/rc.d/functions.d \
/etc/logrotate.d \
- /etc/profile.d \
/usr/lib/tmpfiles.d \
/usr/lib/systemd/system-generators \
/usr/lib/systemd/system/multi-user.target.wants \
@@ -14,7 +13,6 @@ DIRS := \
/usr/share/bash-completion/completions \
/usr/share/zsh/site-functions \
/usr/share/man/man5 \
- /usr/share/man/man7 \
/usr/share/man/man8
all: doc
@@ -28,10 +26,8 @@ install: installdirs doc
install -m644 -t $(DESTDIR)/etc/logrotate.d bootlog
install -m644 -t $(DESTDIR)/etc/rc.d functions
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 rc.conf.5
- install -m644 -t $(DESTDIR)/usr/share/man/man7 parabola.7
install -m644 -t $(DESTDIR)/usr/share/man/man8 rc.d.8 arch-modules-load.8 arch-daemons.8
install -m755 -t $(DESTDIR)/usr/lib/systemd/system-generators arch-daemons
install -m755 -t $(DESTDIR)/usr/lib/systemd arch-modules-load
@@ -48,16 +44,13 @@ install: installdirs doc
%.5: %.5.txt
a2x -d manpage -f manpage $<
-%.7: %.7.txt
- a2x -d manpage -f manpage $<
-
%.8: %.8.txt
a2x -d manpage -f manpage $<
-doc: rc.conf.5 parabola.7 rc.d.8 arch-modules-load.8 arch-daemons.8
+doc: rc.conf.5 rc.d.8 arch-modules-load.8 arch-daemons.8
clean:
- rm -f rc.conf.5 parabola.7 rc.d.8 arch-modules-load.8 arch-daemons.8
+ rm -f rc.conf.5 rc.d.8 arch-modules-load.8 arch-daemons.8
tar:
git archive HEAD --prefix=initscripts-$(VER)/ | xz > initscripts-$(VER).tar.xz
diff --git a/functions b/functions
index 506ce0f..6ca3e43 100644
--- a/functions
+++ b/functions
@@ -5,11 +5,10 @@
# sanitize PATH (will be overridden later when /etc/profile is sourced but is useful for udev)
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-localevars=(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
- LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE
- LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)
+# clear the TZ envvar, so daemons always respect /etc/localtime
+unset TZ
-vconsolevars=(KEYMAP KEYMAP_TOGGLE FONT FONT_MAP FONT_UNIMAP)
+. /etc/profile.d/locale.sh
if [[ $1 == "start" ]]; then
if [[ $STARTING ]]; then
@@ -66,12 +65,6 @@ if (( $? != 3 )); then
fi
unset TERM_COLORS
-# clear the TZ envvar, so daemons always respect /etc/localtime
-unset TZ
-
-# sanitize the locale settings
-unset "${localevars[@]}"
-
unquote() {
local -r quotes=$'[\'"]'
@@ -137,6 +130,10 @@ deltext() {
printf "${DEL_TEXT}"
}
+print_depr() {
+ printf "${C_FAIL} ${1} is deprecated. See ${2} for details.${C_CLEAR} \n"
+}
+
printhl() {
printf "${C_OTHER}${PREFIX_HL} ${C_H1}${1}${C_CLEAR} \n"
}
@@ -367,6 +364,7 @@ load_modules() {
local rc=0
if [[ $MODULES ]]; then
+ print_depr "MODULES=" "rc.conf(5) and modules-load.d(5)"
/usr/lib/systemd/arch-modules-load
rc=$?
fi
@@ -414,7 +412,7 @@ do_unlock_legacy() {
# $2 = source device
# $3 = password
# $4 = options
- printf "${C_FAIL}Using legacy crypttab format. This will stop working in the future. See crypttab(5).${C_CLEAR}\n"
+ print_depr "The legacy crypttab format" "crypttab(5)"
local open=create a=$1 b=$2 failed=0
# Ordering of options is different if you are using LUKS vs. not.
# Use ugly swizzling to deal with it.
@@ -742,15 +740,6 @@ if (( RC_FUNCTIONS_HOOK_FUNCS_DEFINED != 1 )); then
declare -r RC_FUNCTIONS_HOOK_FUNCS_DEFINED=1
fi
-if [[ $DAEMON_LOCALE != [nN][oO] ]]; then
- export LANG=${LOCALE:-C}
- if [[ -r /etc/locale.conf ]]; then
- parse_envfile /etc/locale.conf "${localevars[@]}"
- fi
-else
- export LANG=C
-fi
-
# set colors
if [[ $USECOLOR != [nN][oO] ]]; then
if tput setaf 0 &>/dev/null; then
diff --git a/locale.sh b/locale.sh
deleted file mode 100644
index c465f6f..0000000
--- a/locale.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-unset LANG
-
-if [ -s /etc/locale.conf ]; then
- . /etc/locale.conf
-fi
-
-if [ -z "$LANG" ] && [ -s /etc/rc.conf ]; then
- LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE")
-fi
-
-export LANG=${LANG:-C}
-
-if [ -n "$LC_CTYPE" ]; then
- export LC_CTYPE
-else
- unset LC_CTYPE
-fi
-
-if [ -n "$LC_NUMERIC" ]; then
- export LC_NUMERIC
-else
- unset LC_NUMERIC
-fi
-
-if [ -n "$LC_TIME" ]; then
- export LC_TIME
-else
- unset LC_TIME
-fi
-
-if [ -n "$LC_COLLATE" ]; then
- export LC_COLLATE
-else
- unset LC_COLLATE
-fi
-
-if [ -n "$LC_MONETARY" ]; then
- export LC_MONETARY
-else
- unset LC_MONETARY
-fi
-
-if [ -n "$LC_MESSAGES" ]; then
- export LC_MESSAGES
-else
- unset LC_MESSAGES
-fi
-
-if [ -n "$LC_PAPER" ]; then
- export LC_PAPER
-else
- unset LC_PAPER
-fi
-
-if [ -n "$LC_NAME" ]; then
- export LC_NAME
-else
- unset LC_NAME
-fi
-
-if [ -n "$LC_ADDRESS" ]; then
- export LC_ADDRESS
-else
- unset LC_ADDRESS
-fi
-
-if [ -n "$LC_TELEPHONE" ]; then
- export LC_TELEPHONE
-else
- unset LC_TELEPHONE
-fi
-
-if [ -n "$LC_MEASUREMENT" ]; then
- export LC_MEASUREMENT
-else
- unset LC_MEASUREMENT
-fi
-
-if [ -n "$LC_IDENTIFICATION" ]; then
- export LC_IDENTIFICATION
-else
- unset LC_IDENTIFICATION
-fi
diff --git a/network b/network
index b8b6989..de6e9b4 100755
--- a/network
+++ b/network
@@ -18,9 +18,7 @@ need_legacy() {
}
deprecated() {
- printf "${C_FAIL}Warning:${C_CLEAR} Your network settings are deprecated.\n"
- printf " Please refer to 'man 5 rc.conf' on how to define a single wired\n"
- printf " connection, or use a utility such as netcfg.\n"
+ print_depr "The legacy network settings format" "rc.conf(5)"
}
network_up() {
diff --git a/parabola.7.txt b/parabola.7.txt
deleted file mode 100644
index 7415101..0000000
--- a/parabola.7.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-/////
-vim:set ts=4 sw=4 syntax=asciidoc noet:
-/////
-parabola(7)
-============
-
-NAME
-----
-parabola - basic configuration
-
-SYNOPSIS
---------
-Overview of the basic configuration of Parabola GNU/Linux-libre.
-
-DESCRIPTION
------------
-Parabola exposes the user to the system without hiding any details. This manpage gives a
-brief overview of the configuration files that should be set up on a fresh install.
-
-INITSCRIPTS[[I]]
-----------------
-The initscripts are configured in rc.conf. Here you configure what daemons to start on boot, what storage
-technologies should be enabled and, optionally, a basic network setup.
-
-HOSTNAME[[H]]
--------------
-The hostname of the machine should be set in /etc/hostname. Additionally, either /etc/hosts should be
-configured accordingly, or nss-myhostname should be used. This is needed so the hostname can always
-be resolved to the current machine, which is required by some programs.
-
-LOCALIZATION[[L]]
------------------
-Various locales may be enabled in /etc/locale.gen, and generated by locale-gen. The system-wide locale to be used
-can be configured in /etc/locale.conf
-
-VIRTUAL CONSOLE[[V]]
---------------------
-The virtual console is configured in /etc/vconsole.conf. It allows you to set a font and a keyboard layout, among
-other things. Note that these settings only apply to the console, and not if you use X.
-
-TIME[[T]]
----------
-The local timezone is configured by *symlinking* /etc/localtime to the correct zoneinfo file under
-/usr/share/zoneinfo/. E.g.,
-
- /etc/localtime -> /usr/share/zoneinfo/Europe/Paris
-
-The real-time clock, which keeps track of time when the computer is off, can be configured to either
-be in UTC or in localtime in /etc/adjtime. The default is UTC.
-
-FILESYSTEMS[[F]]
-----------------
-Filesystems are configured in /etc/fstab, and encryption mappings are configured in /etc/crypttab.
-
-INITRAMFS[[R]]
---------------
-The initramfs is generated by mkinitcpio, and can be configured in /etc/mkinitcpio.conf.
-
-PACKAGE MANAGER[[P]]
---------------------
-The package manager, pacman, is configured in /etc/pacman.conf.
-
-BOOTLOADER[[B]]
----------------
-GRUB's configuration is generated from /etc/default/grub by grub-mkconfig. Syslinux is configured in /boot/syslinux/syslinux.cfg
-
-MODULES[[M]]
-------------
-Most modules should be loaded on-demand. Modules to be unconditionally loaded at boot can be specified in /etc/modules-load.d/,
-and modules to be blacklisted from auto-loading can be configured in /etc/modprobe.d/.
-
-SEE ALSO
---------
-
-rc.conf(5), hostname(5), hosts(5), nsswitch.conf(5), locale.conf(5), vconsole.conf(5), timezone(3), hwclock(8), fstab(5), crypttab(5),
-mkinitcpio(8), pacman(8), pacman.conf(5), grub-mkconfig(8), syslinux(1), modules-load.d(5), modprobe.d(5)
-
-AUTHORS
--------
-Written by Tom Gundersen.
-Rebranded for Parabola by Nicolás Reynolds.
diff --git a/rc.conf.5.txt b/rc.conf.5.txt
index 556d223..d33ce72 100644
--- a/rc.conf.5.txt
+++ b/rc.conf.5.txt
@@ -190,21 +190,14 @@ FONT_MAP in /etc/vconsole.conf takes precedence (see vconsole.conf(5)), and is r
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 (see locale.conf(5)), and is recommended.
+LANG in /etc/locale.conf takes precedence (see locale.conf(5)), and is recommended. User-specific
+locale settings which override both /etc/locale.conf and /etc/rc.conf are set in
+$XDG_CONFIG_HOME/locale.conf using the same syntax as /etc/locale.conf.
If unset, it falls back to the C locale.
LOCALE="en_US.UTF-8"
-*DAEMON_LOCALE=*
-
- - If set to 'no', export the C locale to daemons and during the boot process.
- - Otherwise, export LANG (or LOCALE) as configured in /etc/locale.conf (or /etc/rc.conf).
-
-Leave this unset, unless you have a specific reason to set it to 'no'.
-
- DAEMON_LOCALE="yes"
-
*USECOLOR=*
Use ANSI color sequences in start-up messages, unless set to 'no'.
diff --git a/rc.sysinit b/rc.sysinit
index eb49e2b..b285cc7 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -35,12 +35,28 @@ bootlogd -p /run/bootlogd.pid
run_hook sysinit_start
HWCLOCK_PARAMS="--systz"
-case $HARDWARECLOCK in
- "") ;;
- UTC) HWCLOCK_PARAMS+=" --utc --noadjfile";;
- localtime) HWCLOCK_PARAMS+=" --localtime --noadjfile";;
- *) HWCLOCK_PARAMS="";;
-esac
+
+if [[ $HARDWARECLOCK ]]; then
+ print_depr "HARDWARECLOCK=" "rc.conf(5) and hwclock(8)"
+
+ [[ -f /etc/adjtime ]] && { read ; read ; read ADJTIME; } < /etc/adjtime
+
+ if [[ $ADJTIME == 'LOCAL' ]]; then
+ if [[ $HARDWARECLOCK == 'UTC' ]]; then
+ printf "${C_FAIL}/etc/rc.conf says the RTC is in UTC, but /etc/adjtime says it is in localtime.\n${C_OTHER}."
+ fi
+ else
+ if [[ $HARDWARECLOCK == 'LOCALTIME' ]]; then
+ printf "${C_FAIL}/etc/rc.conf says the RTC is in localtime, but hwclock (/etc/adjtime) thinks it is in UTC.\n${C_OTHER}."
+ fi
+ fi
+
+ case $HARDWARECLOCK in
+ UTC) HWCLOCK_PARAMS+=" --utc --noadjfile";;
+ localtime) HWCLOCK_PARAMS+=" --localtime --noadjfile";;
+ *) HWCLOCK_PARAMS="";;
+ esac
+fi
if [[ $HWCLOCK_PARAMS ]]; then
stat_busy "Adjusting system time and setting kernel time zone"
@@ -48,11 +64,11 @@ if [[ $HWCLOCK_PARAMS ]]; then
# Adjust the system time for time zone offset if rtc is not in UTC, as
# filesystem checks can depend on system time. This also sets the kernel
# time zone, used by e.g. vfat.
- # If TIMEZONE is not set in rc.conf, the time zone stored in /etc/localtime
- # is used. If HARDWARECLOCK is not set in rc.conf, the value in
- # /etc/adjfile is used.
- [[ $TIMEZONE ]] && export TZ=$TIMEZONE
+ if [[ $TIMEZONE ]]; then
+ print_depr "TIMEZONE=" "rc.conf(5)"
+ export TZ=$TIMEZONE
+ fi
hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
@@ -121,6 +137,9 @@ status 'Initializing random seed' /usr/lib/systemd/systemd-random-seed load
# Remove leftover files
remove_leftover
+if [[ $HOSTNAME ]]; then
+ print_depr "HOSTNAME=" "rc.conf(5) and hostname(5)"
+fi
if [[ -s /etc/hostname ]]; then
HOSTNAME=$(< /etc/hostname)
fi
@@ -138,20 +157,6 @@ stat_busy "Saving dmesg log"
fi
(( $? == 0 )) && stat_done || stat_fail
-if [[ -f /etc/adjtime ]]; then
- { read ; read ; read ADJTIME; } < /etc/adjtime
-
- if [[ $ADJTIME == 'LOCAL' ]]; then
- if [[ $HARDWARECLOCK == 'UTC' ]]; then
- printf "${C_FAIL}/etc/rc.conf says the RTC is in UTC, but /etc/adjtime says it is in localtime.\n${C_OTHER}."
- fi
- else
- if [[ $HARDWARECLOCK == 'LOCALTIME' ]]; then
- printf "${C_FAIL}/etc/rc.conf says the RTC is in localtime, but hwclock (/etc/adjtime) thinks it is in UTC.\n${C_OTHER}."
- fi
- fi
-fi
-
run_hook sysinit_end
# End of file