summaryrefslogtreecommitdiff
path: root/rc.sysinit
AgeCommit message (Collapse)Author
2012-06-01Merge branch 'master' of git://projects.archlinux.org/initscripts2012.06.1Nicolás Reynolds
Conflicts: hostname.5.txt locale.conf.5.txt
2012-05-29random-seed: use the systemd toolTom Gundersen
Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-05-29vconsole: use the systemd toolTom Gundersen
Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-05-29tmpfiles,sysctl,binfmt: use the systemd toolsTom Gundersen
No point in reinventing the wheel. These and other tools are shipped in the systemd-tools package. Functionality should be unchanged, but we no longer have to maintain the code. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-05-11console: configure console after modules have been loadedTom Gundersen
This should probably be fixed elsewhere, but for now only configure the console once the KMS drivers have been loaded to avoid the settings getting lost. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-05-06Merge branch 'master' of git://projects.archlinux.org/initscripts2012.05.2Nicolás Reynolds
Conflicts: Makefile
2012-04-30vconsole: configure the console as early as possibleTom Gundersen
This makes sure the correct keymap is set before asking users for input and it avoids (to the extent possible) fonts getting garbled when the font is set. Fixes: FS#29646 and FS#25599 Reported-by: Mathieu Pasquet <mathieui@mathieui.net> Reported-by: <marcin2006@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-03-17crypto: move function from sysinit to functionsTom Gundersen
No functional change, just improve readability. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-03-17sysinit: do not unconditionally modprobe any moreTom Gundersen
dm-mod and dm-crypt will be autoloaded when needed (at least on kernels newer than 2.6.36). The rtc modules should be compiled in, as they have been in the official kernels for some time. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-03-17sysinit: remove cryptsetup compatDave Reisner
We haven't had the static binary in nearly 2 years, so simply call this without a PATH lookup. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-17fsck: move FORCEFSCK/FASTBOOT logic to fsck_allTom Gundersen
Avoid global variables, and make things clearer. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-03-17reorder fsck opts, explicitly set end of options markerDave Reisner
Fixes FS#28947. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-13arch-binfmt: move api filesytem mounting from rc.sysinitSébastien Luttringer
this will avoid filesytem to be mounted at every startup if not binfmt is used Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
2012-03-13Support additional binary formats at bootSébastien Luttringer
This patch mount kernel binfmt_misc filesystem at boot and allow loading of a default configuration inspired from systemd binfmt.d way. Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
2012-03-05rc.sysinit: avoid exporting empty TIMEZONE as TZDave Reisner
fixes FS#28458 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-03rc.sysinit: Remove redundant command substitutionLukas Fleischer
Invoke `grep -q` and check its return value instead of checking whether grep(1) produces non-empty output. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-02-03Small style cleanupLukas Fleischer
* Add whitespace to arithmetic expressions. * Use boolean logic for semantically boolean variables. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-02-03Fix indentationLukas Fleischer
Indent code using tabs (instead of spaces) in all source files. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-02-02Merge git://projects.archlinux.org/initscriptsNicolás Reynolds
2012-01-31Add fastboot supportLukas Fleischer
This one adds support for the "/fastboot" file, as well as the "fastboot" kernel command line parameter. If either of them is specified, file system checks are skipped. The only exception is the existence of "/forcefsck" or the "forcefsck" kernel parameter which have precedence over fastboot. Implements FS#26154. Reported-by: Mark <mark@voidzero.net> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-01-14mount: no longer pass '-n' to mountTom Gundersen
This was needed when /etc/mtab was a regular file in order to avoid writing to it when /etc/ was mounted ro. However, now it is not needed. Passing -n should have been a noop, except for the NILFS mount helper. It will only start the daemon if the -n flag is not passed. This fixes FS#22523. Tested-by: Alexander Lam <lambchop468@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-01-12/dev: remove non-devtmpfs supportTom Gundersen
Udev requires devtmpfs to work, so no point in pretending that the system will work without it. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-12-27config: add /etc/hostname supportTom Gundersen
If /etc/hostname is non-empty its contents is assumed to be the hostname. This takes precedence over HOSTNAME in rc.conf. This implements FS#27732 and http://0pointer.de/public/systemd-man/hostname.html, and is the same as what is done on Debian, Ubuntu, Fedora and Suse. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-12-21warn about lack of devtmpfs supportTom Gundersen
This still works (probably), but is not tested, and I have a feeling that udev will drop support for this at some point, so we better prepare people. There is no reason not to enable devtmpfs support (except that it requires a recompile of course). Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-12-21mtab: drop conditional symlinkingTom Gundersen
With of filesystem-2011.12 this would never get triggered. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-12-14Merge branch 'master' of https://projects.archlinux.org/git/initscripts into ↵Nicolás Reynolds
HEAD Conflicts: functions
2011-12-13allow ro rootTom Gundersen
We no longer force root to be rw, but follow what is set in fstab. Things might not work well if root is mounted ro, but now we at least have the possibility of chasing down problems elsewhere. This implements FS#9384. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-27do not limit size on API fsTom Gundersen
These are all owned by root, so risk of DoS is low. Also, running out of space on the fs' would be more critical than running low on memory. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-26rc.sysinit: force linking of /etc/mtab to /proc/self/mountsDave Reisner
At this point, libmount powered mount does the right thing in 99% of cases. util-linux tools all behave in a much more expected manner when this symlink exists, particularly when parsing /etc/mtab. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-26fsck: skip remounting / fsck'ing the root fsTom Gundersen
In case the initramfs already fsck'ed and mounted the root fs ro, we don't remount ro and fsck. We still remount the rootfs rw unconditionally at the end. We should probably stop doing this and require the user to specify rw/ro explicitly in fstab. We assume that the initramfs will also fsck and mount /usr, so we do not fsck any mounted fs (not restricted to the rootfs). Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-06functions: implement a environment file parserDave Reisner
This adds a 'parse_envfile' function that reads files such as /etc/locale.conf and /etc/vconsole.conf without sourcing them as bash logic. Several benefits are realized from this: - Impossible to execute arbitrary code - Bad syntax won't prevent the entire file from being read - Possible to limit what variables are allowed Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-06avoid unnecessary escaping of newlinesDave Reisner
The bash parser assumes that an expression continues when || is at the end of a line. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-30Merge branch 'master' of git://projects.archlinux.org/initscripts2011.10.3Nicolás Reynolds
Conflicts: PKGBUILD
2011-10-29minilogd: killTom Gundersen
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-29config: add /etc/vconsole.conf supportTom Gundersen
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 Gundersen
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-09-25[initscripts] Remove too early /dev/null redirectionGerardo Exequiel Pozzi
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-25timezone: create /etc/localtime as a symlinkDave Reisner
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-08Merge branch 'master' of git://projects.archlinux.org/initscripts2011.09.8Nicolás Reynolds
Conflicts: functions
2011-08-05locale: make /etc/profile.d/locale.sh dynamicTom Gundersen
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 Gundersen
We still support a separate /usr if it was somehow mounted by the initrd. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-08-02/usr: warn on separate usrTom Gundersen
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-17rc.sysinit: Move 'run_hook sysinit_start' after mount root read-onlyKurt J. Bosch
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-17Fix/unify quotingKurt J. Bosch
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-12functions/rc.sysinit: Refactor 'Removing Leftover Files' codeKurt J. Bosch
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. Bosch
Use correct patterns and get rid of the /dev/null redirection workaround needed when trying to remove '..'.
2011-07-12rc.sysinit: fixup fsck refactoringKurt J. Bosch
Revert to using in_array() instead of is_in_array() which actually doesn't exist.
2011-07-10rc.sysinit: Simplify /var/run/daemons workaroundKurt J. Bosch
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-10rc.sysinit: Remove unneeded variables initializationsKurt J. Bosch
Variables should be empty anyway here.
2011-07-10functions/rc.sysinit: Refactor fsck-redirection to prevent breakageKurt J. Bosch
$FSCK_OUT/$FSCK_ERR might not be set when: * unset in some custom sysinit_prefsck hook * calling fsck() from a shutdown hook