aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
AgeCommit message (Collapse)AuthorFiles
2011-06-20status: adjust number of columns after loading modulesTom Gundersen1
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>
2011-06-19Adding hook sysinit_postmountjofko1
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>
2011-06-19rc.sysinit: avoid use of regex match for USE* varsDave Reisner1
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>
2011-06-14rc.sysinit: honor blacklist, not load_modulesDave Reisner1
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>
2011-06-10hostname: echo to kernel directlyTom Gundersen1
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>
2011-06-06Merge remote-tracking branch 'djgera/djgera'Tom Gundersen1
Conflicts: rc.single rc.sysinit Mostly trivial conflicts with Dave's path purging Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-06udev: remove rule generationTom Gundersen1
This has been removed from the udev package, so this code would never be executed. Can finally be removed. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-05hwclock: allow TZ to be set in adjtime, only adjust for TZ during bootTom Gundersen1
This allows HARDWARECLOCK to be removed from rc.conf, if you want to rely on /var/lib/hwclock/adjtime (or wherever the file ends up in the future). It assumes the relevant path is on the rootfs. Furthermore, we can assume (since kernel2.6.??) that the rtc modules set the time from rtc themselves, so our job is just to adjust the tz. (FWIW, this coincides with what systemd does). To get the old behavior of not touching the rtc, set it to anything anything else. We should probably have chosen a syntax for this, like IGNORE. Maybe another time... Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-04Be consistent (with mkinitcpio) source naming of /runGerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-04[initscripts] chmod dmesg.log based on value from dmesg_restrictGerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-05udev: don't silence settle + trivialTom Gundersen1
If settle finishes too early, we want to know as some needed devices might not yet have been enumerated. Do not pass --quiet. Do not check for running udev before doing trigger/settle. Worst case, if someone does not have udev (which is not supported), they will see some extra status lines, but boot will still continue. Lastly, remove obvious comments (they were repeating the status message in the line below). Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-05add PATH, strip absolute path from binariesDave Reisner1
Since we're declaring a PATH anyways, we may as well use it. This gives us immunity against binaries moving around, as in the recent case of iproute2. A few other minor, associated, tweaks to go along with this: * any -x tests are modified to use 'type -P' to resolve the path before checking for execute permission * any pidof checks are stripped of paths as well.
2011-06-05Merge remote-tracking branch 'falconindy/working'Tom Gundersen1
Conflicts: rc.sysinit Conflict with ip move away from /usr
2011-06-05loopback: support separate /usr2011.06.3Tom Gundersen1
The move to iproute2 broke the setup of loopback for users having a separate /usr, as it was not monuted before /usr/bin/ip was called. Together with iprouet2-2.6.38-3, this fixes the problem by using /sbin/ip instead. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-04use $() instead of `` for command substitutionsDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-04rc.d/rc.sysinit: whitespace cleanupDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-04rc.sysinit: allow exec in /runDave Reisner1
We already have /tmp and /dev/shm as world writeable directories with exec permissions, so it doesn't necessarily make sense to inhibit exec here. There also might be use cases where running one-off programs from /run might make sense. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-04rc.sysinit: kill off VERBOSE= parameterDave Reisner1
Upstream already supports this via the loglevel= parameter on the kernel cmdline, so we should support using this instead of our own homegrown solution. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-02nisdomainname: remove supportTom Gundersen1
This is as part of deprecating net-tools. nisdoaminname has been moved to yp-tools, and the location of the config file has changed. When using ypbind the doaminname is set as part of the rc script. If needed for other purposes a new rc script should be added. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-01fixup: stat_busy/stat_done -> statusTom Gundersen1
Commit d8796827 introduced a minor bug, this fixes it. We alse add some indentation to avoid future confusion. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-31Revert "udev: generate blacklist on boot"Tom Gundersen1
This reverts commit 99d64f5789f01243903be4b32078ec38bdce75fa. We decided not to provide a compatibility layer, but rather require the user to create blacklist files in /etc/modprobe.d manually. Hence, this is no longer needed. The reason was that the compatibliy would not be 1-to-1, so it might be missleading to pretend that it was. Also, most people should not need the blacklisting in the first place. Conflicts: Makefile Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-23Merge remote-tracking branch 'seblu/master'Tom Gundersen1
2011-05-22network: deprecate net-tools, add iproute2 supportDave Reisner1
Provide large warnings when net-tools functionality is used. Add documentation in rc.conf for the new iproute2 based config. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-22network/rc.sysinit: remove dead codeDave Reisner1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-21Improve coloring on light and transparent termSebastien Luttringer1
This patch improve coloring in light and transparent term. It uses tput if available or default color code. It remplace \033 by \e. It's a kind of rollback from commit 65f410, because initscripts are now in bash, and argument "\e isn't recongized in all shells" is not an issue anymore. This is not done in locale.sh script which can be sourced by others shell, so we try to be the more compliant as possible Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-19use mount -n for devpts and shmGerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-19Fix typoThomas Bächler1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-19fixup: also clear /tmp if it is a mountpointTom Gundersen1
eda191cf78365cc3d1 inadvertently introduced a change so that /tmp was not cleared if it was a mountpoint. This restores the old behaviour. It is strongly adviced to not monut anything but a tmpfs on /tmp. This would avoid the issue. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-19udev: generate blacklist on bootTom Gundersen1
udev will read /etc/modprobe.d/*.conf and blacklist all modules that are listed as blacklist <module> We parse rc.conf at boot and generate such a .conf file. It cannot be written to /etc this early, so we save it to /run. A symlink exists in /etc to get the desired functionality. With this patch (and an analogous one in mkinitcpio) load-modules.sh can be removed from the udev package without loss of significant functionality. Setting MOD_AUTOLOAD will then no longer take effect, nor will kernel parameters. Thouhgh, kernel parameters might still affect the initramfs as the implementation is independent. Original-idea-by: Benjamen Richer <br@waldteufel-online.net> Based-on-patch-by: David Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-12fixup: symlink /var/run/daemons -> /run/daemonsTom Gundersen1
This did not work if the folder existed already. Rather than overwriting the folder with a symlink, the symlink was placed in the folder. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-09Fix copy&paste /dev/.udev -> /run/udevGerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-08Revert "udev: do not automatically save persistent net/cd udev rules to /etc ↵Tom Gundersen1
on boot" This fixes FS#24115. The persistent net/cd rules will go away soon, but no replacement is in place yet, so we reinstate the copying magic. This partially reverts commit e9b658239f45d858ff7b30b46441b8733d20f151. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-08workaround: symlink /var/run/daemons -> /run/daemonsTom Gundersen1
Some initscripts check the folder /var/run/daemons to see if another daemon is running. They should not do this as this folder is supposed to be internal to initscripts, and use ck_daemon instead. However, we add this workaround to minimize the pain. Should be removed one day. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-08Change stat_busy()/stat_done() -> status()Gerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30Change udev trigger orderGerardo Exequiel Pozzi1
Respect the order documented at udev README and systemd files. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-26Fix a small typo introduced by 09c27ea248efebe1e72aa688cb55996dadbbbe29Cody Maloney1
/devshm -> /dev/shm Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-26fixup: umount tmpfs on shutdownTom Gundersen1
As suggested by seblu: - add comment to explain what we unmount and why, and - use /bin/grep rather than grep Also add some more redirects to /dev/null. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-24pidof: don't use -o %PPIDTom Gundersen1
No need to ommit the parent process, as it's name will not coincide with udevd. Original-patch-by: David Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-23remount root very earlyTom Gundersen1
This remounts root read-only as early as possible. In FS#23845 we saw an example of what might happen if we boot with root mounted rw and something manages to opens a file read-write on root before we remount read-only. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-23create /run/lockTom Gundersen1
This allows /var/run and /var/lock to be symlinked to /run and /run/lock, respectively. This would be the final step in fixing FS#18157. With /run/lock created early in boot it would be possible for tools like mdadm and lvm2 to use this directory for their locking, and maybe avoid the --sysinit parameter. This would have to be implemented in the respective packages though. Finally, /run/lock is created 1777 just like /var/lock is now. For the future, it might make sense to follow systemd's lead and make it 0755, and then create a subdir /run/lock/lockdev owned by root:lock with permissions 0755. This would improve security and fend agains DoS attacks, but we would have to check carefully what packages are affected. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-23bootlogd: log messages to console during early bootTom Gundersen1
This saves all the output during boot to /var/log/boot, which makes debugging boot problems much simpler. The logfile contains all the control (color) characters from boot, so some post processing is in order before the log can be read in a nice format (e.g. less should be able to show this nicely in raw mode). Start bootlogd as soon as the required /dev/pts is mounted. When boot is finished (either at the end of rc.multi or rc.single) create the required lof file (/var/log/boot) if it does not exist. This causes bootlogd to flush the log to disk. Finally, send SIGTERM to bootlogd and clean up after it. Idea-and-original-patch-by: Søren Poulsen <nikorpoulsen@gmail.com> Tested-by: David Goldstein <djg1971@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-23/dev: mount /dev/pts and /dev/shm during early bootTom Gundersen1
This has two purposes: 1) it allows boot services like bootlogd (that needs /dev/pts) to be started very early in boot, and 2) by setting the standard options in rc.sysinit rather than in fstab we have control over them and can easily integrate them with other packages and make adjustments to fix bugs. This brings /dev/{pts,shm} into line with how we handle /dev, /proc, /sys and /run. With this patch /dev/{pts,shm} can (and probably should) be removed from the default fstab file, and fstab should only contain entries for the mountpoints the user has specified during install, like /boot, /home and /var. It will now be possible to boot a working system with an empty fstab. If /dev/{pts,shm} is in fstab the mountoptions there will take precedenc over the standard ones. Cc: Pierre Schmitz <pierre@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-22removed leftover mkdirTom Gundersen1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-22Cleanup stat_busy vs statusTom Gundersen1
Minor cleanups, no functional change. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-21Drop old /sys/kernel/uevent_helperSebastien Luttringer1
This is not used on modern udev system. It's an old legacy. We should drop it. [tomegun: use "status" rather than "stat_busy"] Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-16Fix and clean forcefsk detection2011.04.1Sebastien Luttringer1
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-04-15Fix console verbosity and add config via rc.confSebastien Luttringer1
This patch fix verbosity which use var exported by initcpio in place of kernel. Verbosity is an initscripts parameter, so it should have a definition in rc.conf. Kernel parameter should be a shortcut. New option is called VERBOSE. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-04-13mdadm: disable SoftRAID detectionSebastien Luttringer1
This job is done by recent version of mdadm in /lib/udev/rules.d/64-md-raid.rules. This will also fix FS#20117. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-13Add utmp group supportTom Gundersen1
Fixes FS#23309. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-13/run: mount /run if it is not already mountedTom Gundersen1
This is in accordance with the new "standard" agreed on by the major distros, and discussed on our mailinglists. This folder will be used by udev/mdadm and other tools rather than putting things in /dev/.XXX. In the future we might symlink /var/{run,lock} to /run/{,lock} as the other distros are intending to do. First, we would have to make sure that /var/{run,lock} can be mounted as tmpfs without problems. Signed-off-by: Tom Gundersen <teg@jklm.no>