aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
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.
2011-07-10functions/rc.sysinit: Refactor fsck-redirection to prevent breakageKurt J. Bosch2
$FSCK_OUT/$FSCK_ERR might not be set when: * unset in some custom sysinit_prefsck hook * calling fsck() from a shutdown hook
2011-07-10rc.sysinit: Declare $FORCEFSCK read-onlyKurt J. Bosch1
This prevents sysinit_prefsck hooks from overwriting the value.
2011-07-10Refactor kill_everything, fsck_all and mount_all codeKurt J. Bosch4
Genaral scheme for hook positions is now: run_hook pre_foo if [[$WE_WANT_TO_DO_FOO]]]; then stat_busy "Doing foo" if [[$PRECONDITIONS_FOR_FOO_NOT_SATISFIED]]; then stat_fail else ... stat_done fi fi run hook post_foo rc.sysinit ----------- run_hook pre_foo [[$WE_WANT_TO_DO_FOO]] && status "Doing foo" foo run hook post_foo functions ------------ foo() { [[$PRECONDITIONS_FOR_FOO_NOT_SATISFIED]] && return 1 ... } Rationale Following this scheme as close as possible (without duplicating code and status messages) makes stuff more readable and uniform. Splitting kill_everything() into two new functions stop_all_daemons() and kill_all() also allows customization of either daemons stopping or process killing in an easy way. Suggested-by: Tom Gundersen <teg@jklm.no>
2011-07-10functions/rc.multi: Strip paths from binariesKurt J. Bosch2
Now that we set PATH in functions, we can use is everywhere.
2011-07-10functions: Add missing quotes in mount_all()Kurt J. Bosch1
Prevent any word splitting where not intended.
2011-07-10functions: Get rid of superfluous braces in udevd_modprobe()Kurt J. Bosch1
Braces are not needed in this case as a variable name can not begin with a number.
2011-07-10rc.sysinit: Fix stat_busy block indentationKurt J. Bosch1
The general rule is now: Align stat_{fail,done} with stat_busy
2011-07-07Remove usage of head in PKGBUILDSebastien Luttringer1
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-07-07changing _rd.d to _rc_d to avoid:derhoch1
/etc/bash_completion.d/rc.d: line 19: `_rc.d': not a valid identifier Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-07-02functions/rc.single: Clean up whitespaceKurt J. Bosch2
2011-06-28rc.sysinit: Add status output for mtab and dmesg.log creationKurt J. Bosch1
2011-06-28rc.sysinit: Refactor /etc/mtab symlink detection to avoid empty if clauseKurt J. Bosch1
2011-06-28Move export PATH into functionsKurt J. Bosch3
Also sanitze the PATH for rc.single, rc.multi, rc.local and daemons.
2011-06-28functions: Make activate_vgs return 0 if noop for consistencyKurt J. Bosch1
2011-06-28Move activate_vgs and crypt stat_busy to the top for consistencyKurt J. Bosch2
2011-06-28Move fsck executable check into fsck_all() for consistencyKurt J. Bosch2
2011-06-28rc.sysinit: Get rid of evalKurt J. Bosch1
2011-06-28Refactor to get rid of simple if-constuctsKurt J. Bosch2
2011-06-28functions: Simplify kill_everything() omit_pid handlingKurt J. Bosch1
All credits go to: Dave Reisner <d@falconindy.com>
2011-06-28functions: Simplify ck_depends() for statementKurt J. Bosch1