aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
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>
2011-07-26Add /etc/tmpfiles.d into makefileSebastien Luttringer1
This add a /etc/tmpfiles.d inside makefile to automatically create directory with package. /etc is a better place to store user specific tmpfiles config where /usr/lib is better for shipped with package config. As Dave as already included this path inside his arch-tmpfiles, it would be a shame to miss out. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-07-25network: reword depracation message2011.07.1Tom Gundersen1
Make it clear that the message refers to network settings, as some users found this confusing. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-07-24arch-tmpfiles: add cmdline parametersDave Reisner2
Categorize actions as 'create' or 'remove', for finer control. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-24arch-tmpfiles: check args, warn on invalid entriesDave Reisner2
Introduces the checkparams functions, which thoroughly checks arguments for presence, length, and some amount of data validation. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-24Merge remote-tracking branch 'kujub/master'Tom Gundersen1
2011-07-24arch-tmpfiles: add new script to handle volatile file controlDave Reisner4
This is the same concept as systemd's tmpfiles handling, slightly simplified to avoid timed re-triggering of file cleaning. Most of our current file cleaning that takes place in rc.single and rc.sysinit is replaced by this, with the exception that we hold onto the /var/lock and /var/run for finer control, since we still check for the possibility of these directories being symlinks and adjust accordingly. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-22rc.shutdown: Move 'run_hook shutdown_start' after "Initiating Shutdown..."Kurt J. Bosch1
Rationale Avoid printing any start hook status messages above the head line.
2011-07-17rc.sysinit: Move 'run_hook sysinit_start' after mount root read-onlyKurt J. Bosch1
Rationale Currently we have to duplicate at least the mount /proc code line into a custom sysinit_start hook to be able to start a splash daemon or something in case no initcpio is used. Moreover we want to make sure nothing can open files read/write on root which would block the read-only remount. So running the sysinit_start hook a bit later appears to be more save.
2011-07-17functions: Cosmetics: Refactor usage of local daemon variablesKurt J. Bosch1
2011-07-17Fix/unify quotingKurt J. Bosch2
The rules should be: * Use quotes when literal strings are involved. * Use quotes when ever using a substitution which might produce blanks as a possitional parameter unless word splitting is intended. * Use quotes on the right hand side within '[[ = ]]' unless pattern matching is intended. * Don't use quotes for substitutions where not needed as in assignments.
2011-07-17functions: Unify whitespace inside '(( ))'Kurt J. Bosch1
2011-07-17functions: Remove useless '$' within '(( ))'Kurt J. Bosch1
2011-07-12rc.single: Call remove_leftover() when going single-userKurt J. Bosch1
This avoids trouble because of stale /run/daemons/* files.
2011-07-12functions/rc.sysinit: Refactor 'Removing Leftover Files' codeKurt J. Bosch2
Move it into a function to allow clean error detection of all steps performed and also to be able to reuse this in rc.single.
2011-07-12rc.sysinit: Fix /tmp/.* patternKurt J. Bosch1
Use correct patterns and get rid of the /dev/null redirection workaround needed when trying to remove '..'.
2011-07-12functions: Make in_array() non DAEMONS specificKurt J. Bosch1
For checking whether a daemon is started via the DAEMONS array we use ck_autostart() now. So make in_array() generic as the name suggests instead of removing '@'-prefixes from array members behind ones back. Suggested-by: Dave Reisner <d@falconindy.com>
2011-07-12functions: Use ck_autostart in stop_all_daemons()Kurt J. Bosch1
This is just a bit simpler. in_array() should be fixed to be non daemon specific in a later patch.
2011-07-12rc.sysinit: fixup fsck refactoringKurt J. Bosch1
Revert to using in_array() instead of is_in_array() which actually doesn't exist.
2011-07-10Merge remote-tracking branch 'seblu/master'Tom Gundersen2
2011-07-10rc.single: Remove $PATH assignmentKurt J. Bosch1
No need to set $PATH any more now that is in functions
2011-07-10rc.sysinit: Simplify /var/run/daemons workaroundKurt J. Bosch1
There are only two possible situations: a) /var/run is a symlink to /run: Conditional result is always 'false' even without checking /var/run/daemons (which doesn't exist). b) /var/run is a directory: Conditional result is always 'true' because any symlink was removed when cleaning /var/run. So following changes can be made: * /var/run/daemons can be removed unconditionally because a symlink doesn't survive cleaning of /var/run anyway. * The check whether /var/run/daemons is a symlink can be dropped because it has actually no effect. Furthermore we can refactor to use the same conditional used for cleaning /var/run because we can't create the symlink if /var/run is not a directory.
2011-07-10functions/netfs: Refactor filesystem type lists and $NETFSKurt J. Bosch2
Currently $NETFS is used only for fsck and mount in rc.sysinit. Since we moved it into functions, we can use it in netfs too to get rid of redundancy. functions: * Move 'nosysfs' from $NETFS into the mount -a type list because thats obviously the only meaningfull place. * Add 'nofuse.glusterfs' to $NETFS to match the lists in netfs. * Remove all 'no'-prefixes from $NETFS to make it more useful and readable. * Add 'no'-prefixes to fsck and mount -a commands by parameter substitution. netfs: * Instead of the literals use $NETFS from functions which contains the same types now
2011-07-10netfs: Refactor to provide meaningful exit codeKurt J. Bosch1
Get rid of simple if-clauses and provide meaningfull exit code. Maybe someone wants to abort suspend to disk/ram or something if umount fails or even start this in a loop.
2011-07-10netfs: Strip paths from binariesKurt J. Bosch1
We set $PATH in functions now, so use it.
2011-07-10netfs: cleanup whitespaceKurt J. Bosch1
2011-07-10functions: Speed up reboot/shutdown by recognizing killall5 exit code 2Kurt J. Bosch1
killall5 returns 2 if it didn't find any processes to send to. Using this avoids sleeping longer than needed. This saves another up to six seconds of reboot/shutdown/go-single time.
2011-07-10functions: Make status() return the actual exit codeKurt J. Bosch1
The exit code returned by the given command might be useful/expected, so don't discard but return it.
2011-07-10rc.sysinit: Remove unneeded variables initializationsKurt J. Bosch1
Variables should be empty anyway here.