Age | Commit message (Collapse) | Author | Files |
|
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>
|
|
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>
|
|
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>
|
|
We still support a separate /usr if it was somehow mounted by the initrd.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
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>
|
|
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.
|
|
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.
|
|
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.
|
|
Use correct patterns and get rid of the /dev/null redirection workaround needed when trying to remove '..'.
|
|
Revert to using in_array() instead of is_in_array() which actually doesn't exist.
|
|
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.
|
|
Variables should be empty anyway here.
|
|
$FSCK_OUT/$FSCK_ERR might not be set when:
* unset in some custom sysinit_prefsck hook
* calling fsck() from a shutdown hook
|
|
This prevents sysinit_prefsck hooks from overwriting the value.
|
|
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>
|
|
The general rule is now: Align stat_{fail,done} with stat_busy
|
|
|
|
|
|
Also sanitze the PATH for rc.single, rc.multi, rc.local and daemons.
|
|
|
|
|
|
|
|
|
|
|
|
kill_everything
|
|
This avoids errors if one should set the noclobber shell option somewhere (within a daemon script or some custom function).
We already had this, but it seems gone lost mostly.
|
|
When using process substitution with status(), the resulting /dev/fd/* might get lost before it is actualy used. This happens in case a custom stat_busy() forks a subshell.
|
|
Note: The code
status "$text" $command > $file
writes nothing because there's a &>/dev/null within status().
|
|
|
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
To avoid setting the kernel timezone with an out-of-date /etc/localtime, we pass TZ
directly to hwclock.
Also document how TIMEZONE and HARDWARECLOCK are optional in rc.conf
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This is a cleanup of a commit 171da3d. We get errors because /tmp/. and /tmp/.. cannot
be deleted on boot. Send them to /dev/null.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
|
|
|
|
rc.single changes (when coming from multi-user):
* avoid settling UDev quietly as in rc.sysinit
* modules defined in rc.conf are loaded if missing
* minilogd is started before udevd as in rc.sysinit
rc.sysinit behaviour is unchanged
|
|
|
|
|
|
|
|
|
|
|
|
Error/stat_fail when $TIMEZONE is invalid instead of skipping silently.
|
|
|
|
|
|
|
|
|
|
In case loading modules enables a frambuffer with higher resolution than the
standard 80 columns, we recalculate the number of columns after all modules
have been loaded.
Original-patch-by: Aaron Griffin <aaronmgriffin@gmail.com>
Original-patch-by: Søren Poulsen <nikorpoulsen@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
In some cases is good to know when rc.sysinit is going to use /usr
See FS#24712
Signed-off-by: jofko <joffko@gmail.com>
[tomegun: added comment to 'functions' and changed name of hook]
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Although silly, this would positively match something such as
USRBTRFS=deadeyes
Instead, enumerate the match as a simple glob.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This is some unfinished business from our removal of load-modules.sh.
We call modprobe with -ab for the contents of the MODULES array, which
should no longer contain ! prefixed module names. --quiet is explicitly
ommitted, as users should be aware of any errors that might occur here.
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This allows us to ignore the hostname utility, whose home is currently in flux.
Suggested-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|