aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2011-11-06Fix misspelt error messageJelle van der Waa1
FS#26726 error message should say 'Daemon' instead of 'Dameon' [tomegun: fixed commit message] Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2011-11-06locale.sh: fix LC_TELEPHONE/LC_MEASUREMENTTom Gundersen1
Thanks to Fabio Scotoni. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-05bootlog: filter out some more escapecodesTom Gundersen1
In particular "^[[119G". Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-04swapoff: umount swap-backed fs before switching off swapTom Gundersen2
Factor out umounting. Explicitly skip umounting API directories, rather than matching on fs type. This allows us to e.g. unmount all tmpfs but leaving /run and /dev/shm alone. v3: fixed some regressions in v2, made 'API filesystems' less general v2: new umount_all implementation based on proposal by Dave and input from Anthony. Also, ignore ramfs as it is not backed by swap. Cc: Dave Reisner <d@falconindy.com> Cc: C Anthony Risinger <anthony@xtfx.me> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-29rc.shutdown: reorder a bitTom Gundersen1
The new ordering is now: 1) book-keeping 2) shutting down and killing processes 3) swapoff 4) unmounting and tearing down of block devices The reason to move 1) to the top is so it will not interfere with the killing of processes. The reason for not moving 3) to the top as well is that we want to minimize the amount of stuff that has to be moved from swap to ram. However, swapoff must happen before 4) as we don't know what is under the swap device/file. Added a TODO: unmount any devices backed by swap (tmpfs/ramfs) to make sure that their contents is thrown away rather than moved to ram. In principle we might get OOM on shutdown due to the current situation, but in most cases the only problem should be that shutdown is unecessarily slow. Thanks to Dan and Dave for prompting me to look into this. Cc: Dan McGee <dpmcgee@gmail.com> Cc: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-29minilogd: killTom Gundersen5
This is not very useful, is not maintained, has open serious bugs. Better to admit that it does not work and just remove it. Someone could easily make an AUR package with a hook, if they want it and can make it work as expected. The only case where this would be useful is in case lvm monitoring is in use and dmeventd sends out a message to syslog before syslog-ng is started (there is a very small window). However, not even this works atm (as far as I know) due to bugs in minilogd. Signed-off-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-29locale: fix locale.sh for zshTom Gundersen1
Uglier script, but should now work with zsh as well as bash. v2: only read rc.conf if LANG is not set in locale.conf, no functional change. Based on suggestion by Dave. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-29udev: binary moved, require 174Tom Gundersen2
2011-10-29udev: exit on shutdownTom Gundersen1
udev was receiving some events (due to e.g. swapoff) on shutdown that caused it to fork new processes. These then receivde TERM before they could finish, and complained on the console. In principle, I'm worried that, with the right ammonut of bad luck, we could fork off some process at exactly the wrong time which escapes the killall logic. This, by the way, highlights the frailty of the killall stuff. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-29bits, bytes, who cares?Tom Gundersen1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-29config: add /etc/vconsole.conf supportTom Gundersen1
Read KEYMAP, CONSOLEFONT and CONSOLEMAP from vconsole.conf. If they are set they take precedence over the values in rc.conf. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-18mtab: delete any stale locks2011.10.2Tom Gundersen1
This should fix (to the extent possible) #FS26337. Figured-out-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-18DAEMON_LOCALE: support in the same way as locale.shTom Gundersen1
We don't have the problem with non-bash shells here, but better make the support uniform.
2011-10-18PKGBUILD: updateTom Gundersen1
We now require udev 173, and the manpages use asciidoc.
2011-10-18Add rc.d manual page2011.10.1Sebastien Luttringer3
Thanks to Elvis Stansvik <elvstone@gmail.com> for its template. Fix bug: FS#25269 Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-10-18locale.sh: support /etc/locale.confTom Gundersen3
This is mainly to support non-bash shells that cannot source rc.conf. The format of /etc/locale.conf is described here: <http://0pointer.de/public/systemd-man/locale.conf.html>. If LANG is not set in locale.conf, then we fall back to LOCALE from rc.conf, as before. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-26hooks: move shutdown_poweroff before remounting / ro2011.09.2Tom Gundersen1
This will make sure the same hook is run regardless of whether you pivot to the shutdown ramfs or not. This is in order to run apcupsd --killpower as pointed out by Gerardo. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-26rc.conf: disable hwclock and netfs by defaultTom Gundersen1
These are only useful to a minority of users. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-24respect the user's choice for /etc/localtimeDave Reisner1
This can be a symlink or a regular file, and rc.sysinit will preserve it as such. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-25bootlog: clean some more ANSI codes2011.09.1Tom Gundersen1
I was getting "^[71G", this fixed it. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-25kill: give proper error messages and increase timeoutTom Gundersen1
With the new logic we will only wait for the timeout in case of problems, we therefore increase the timeout as this will make problems more obvious. There has been reports of problems with processes not being terminated, but hopefully this should help us reproduce them. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-25shutdown: move disabling of monitoring/swapTom Gundersen1
We do this before killing all processes. There is no reason to do it later, and this might give some processes a bit more time to terminate properly. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-25timezone: use function in shutdown like in sysinitTom Gundersen1
This uses the function introduced in 9b77b7d7b535c3c52c99a95374e1f800466c6414. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-09-25[initscripts] Remove too early /dev/null redirectionGerardo Exequiel Pozzi1
Since recent change in udev package [#1] (install: remove post-install) In case of booting without initramfs and there is no /dev/null: * if / is ro, devtmpfs mount will fail, in consecuence /dev will be mounted as tmpfs. * if / is rw, devtmpfs mount will success, but a regular file /dev/null in / will be created. [#1] http://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/udev&id=8728747c2b3d5d0506f7e6f1ac74edc0319591d6 Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-09-25[initscript] Make locale.sh consistent with default rc.confGerardo Exequiel Pozzi1
rc.conf defaults LOCALE to en_US.UTF-8 Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-09-25timezone: create /etc/localtime as a symlinkDave Reisner2
Abstract out timezone setting into its own function, passing Country/Area as a parameter. Do some menial checking to make sure: - the zonefile actually exists, erroring when it doesn't - /etc/localtime is a symlink to the correct zoneinfo file, relinking when it isn't. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-25functions: clarify source of module loadingDave Reisner1
This isn't _all_ your modules. Just the extras specified from rc.conf. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-08-31Load sysctl config files from sysctl.dSebastien Luttringer3
This patch implement loading of sysctl config files as described in http://0pointer.de/public/systemd-man/sysctl.d.html This is a very conveniant way of configuring sysctl option for sysadmin which can drop sysctl config files inside this directory to enable some feature. Dropping a file like disableipv6.conf inside this directory will disable ipv6 $ cat disableipv6.conf net.ipv6.conf.all.disable_ipv6 = 1 There is atm no package which use this functionnality Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-27rc.d: handle a set of optionsSebastien Luttringer3
rc.d can now take --started, --stopped, --auto, --noauto as option which help user to filter list of daemon for all actions As a corollary list command can now take a list of dameon to display All kind of arguments can be mixed to obtain the proper output. zsh and bash completion are updated Note: Output of help command exit 0 and is no more printed on stderr Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-27New smarter display of bad daemon names in rc.dSebastien Luttringer1
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-27Remove double case in hwclock daemonSebastien Luttringer1
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-27Let background daemons show errors on stderrSebastien Luttringer1
Daemon running in background should let error output to be printed. Standart output is still hided to have a correct printing in default cases. This will help to detect error in daemon runned in background. This will also remove have_daemon call which is already called in start_daemon. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-25shutdown: rely on init being installed by the initrdTom Gundersen1
init is now included in mkinitcpio's busybox, so we don't need to copy it. This might break compat with dracut, but it can be worked around very simply in case anyone wants to use dracut with Arch, so we don't care. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-25sutdown: support both poweroff and rebootTom Gundersen1
Tell the /run/initramfs/shutdown what action to preform. Still no kexec support though. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-20Clean up more ANSI codes from /var/log/boot (close FS#25682)Tom Gundersen1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-20boot.log: clean ANSI codesTom Gundersen1
Suggested-by: Karol B?a?ewicz <karol.blazewicz@gmail.com> Suggested-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-19rc.d: clarify error when [[ -x /etc/rc.d/$i ]] failsDave Reisner1
A script marked a-x will be reported as missing, when in fact it's only non-executable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-08-19network: error out on missing or unknown interfaceDave Reisner1
This was caused by commit fc9ce46483fc4d -- if the user has no interface defined but also has no legacy variables defined, our legacy check fails, and we try to bring up the network using an empty declaration. Add in an additional safeguard of checking sysfs to see that the interface really does exist. Fixes FS#25671 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-08-19locale.sh: added missing file to gitTom Gundersen1
Reported-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-18functions: fix typo in warning messageTom Gundersen1
Fixes #25623. Reported-by: Segej Puykin <arch@sergej.pp.ru> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-05locale: make /etc/profile.d/locale.sh dynamicTom Gundersen2
locale.sh parses rc.conf at runtime and sets the LOCALE accordingly, rather than writing a static file at every boot. This eliminates yet another write to /etc. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-04/usr: clarify warning a bitTom Gundersen1
We still support a separate /usr if it was somehow mounted by the initrd. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-04/usr: move all executables from /sbin to /usr/sbinTom Gundersen1
At worst this will give an error message if /usr is not mounted, which is fine as we are warning against this anyway. It will not break boot. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-03arch-tmpfiles: avoid subshell in creating empty filesDave Reisner2
install /dev/null as the new file instead of creating an empty file via a no-op process substitution. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [tomegun: the commit also adds a similar fix to rc.shutdown] Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-02Merge branch 'pivot-shutdown'Tom Gundersen1
2011-08-02/usr: warn on separate usrTom Gundersen1
We check for /usr/lib being present. If it is not, we assume /usr is not yet mounted and warn. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-07-28NEED_ROOT: default to off2011.07.3Tom Gundersen1
This keeps the functionality, but disables it by default. Individual scripts/functions can turn it on if they want. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-07-26shutdown: pivot into a shutdown ramfsTom Gundersen1
Assume that a shutdown executable has been created in /run/initramfs by either dracut or mkinitramfs. Setup /run/initramfs to be a new root and pivot into it. Making sure that nothing is using our old root anymore. In particular this means we have to reexec init in the new root and make sure stdio is using the new /dev/console. This is inspired by Harald Hoyers work for systemd as well as Thomas Bächlers deinitramfs. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-07-26Merge remote-tracking branch 'falconindy/working'2011.07.2Tom Gundersen1
2011-07-26tmpfiles.conf: fix improper creation of /var/run/utmpDave Reisner1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>