aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2011-06-01Merge branch 'snowman'2011.06.1Tom Gundersen1
Conflicts: rc.d Trivial conflict with dave's eval purge. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-01rc.d: Add error message when daemon script is not foundEric Bélanger1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-31net: add examplesTom Gundersen1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-31depraction: MOD_AUTOLOAD and MODULES blacklistingTom Gundersen1
Add comment to note that MOD_AUTOLOAD should always be "yes" and blacklisting is no longer supported in the MODULES array. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-31Revert "udev: generate blacklist on boot"Tom Gundersen4
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-31rc.d: print usage if not enough argumentSebastien Luttringer1
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-31rc.d: Remove cd from the loopSebastien Luttringer1
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-31rc.d: declare ENV as an arrayDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-23Merge remote-tracking branch 'seblu/master'Tom Gundersen6
2011-05-23rc.d zsh completion detect running daemonsSebastien Luttringer1
This patch adds functionalities of bash completions about running demons Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-22network: deprecate net-tools, add iproute2 supportDave Reisner4
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-22Add a zsh completion script for the command rc.d.Clément Démoulins2
seblu: Fix typo, add vim modeline Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-22rc.d bash completion detect running daemonSebastien Luttringer1
This patch adds sexy features from Auguste Pop bash completion patch. Mainly, detect if a daemon is running and complete accordingly Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-22network/rc.sysinit: remove dead codeDave Reisner2
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-22Add rc.d bash completionSebastien Luttringer2
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-21Improve coloring on light and transparent termSebastien Luttringer2
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-21Add TERM var to rc.d cleaned envSebastien Luttringer1
We need to do this to allow a correct detection of terminal colors in functions sourced by rc.d scripts Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-21Add syntax to vim modeline in rc.d scriptSebastien Luttringer1
With new name of script, vim doesn't reconize correctly file format. We need to set it explicitly. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-19add killall5 omit pid functionalityGerardo Exequiel Pozzi1
(me) Update the offsets so can be merged now without any issues and respect the indentation. Implements FS#10536 - [initscripts] internal: save a pid from killall5 All credits to: Kurt J. Bosch Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
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 Gundersen4
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-19makefile: do not make functions executableTom Gundersen1
This was a bug in the original conversion to makefile (installing functions twice, the last time with wrong permissions). Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-12releasing: update instructinos after going through it onceTom Gundersen1
I struggled a bit with finding the simplest way of creating packages, so after asking on irc, I thought I'd add the answer here. This is not really initscripts specific, so could easiy be expanded and put in a wiki. Should work for any package that can be built without also building its deps. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-12Improve rc printing2011.05.2Sebastien Luttringer1
- print daemon text with C_CLEAR and not C_MAIN - print rc name based on $0 (in case of renaming) Signed-off-by: Sebastien Luttringer <seblu@seblu.net> 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-11Rename rc into rc.d2011.05.1Sebastien Luttringer2
To avoid conflict with plan9 rc shell we need to rename our rc. Original name come from debian invoke-rc.d, shortened into rc. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> 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 Pozzi3
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30Merge remote-tracking branch 'seblu/master'Tom Gundersen1
Conflicts: rc Trivial conflict with Dave's counting vs summing patch. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30workaround: do not set property=STARTUP=1 when calling udevadmGerardo Exequiel Pozzi1
Apply same logic like in rc.sysinit (commit c3063d0400e7a55c9dbd6ff1b76887744e9b6224) 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 Pozzi2
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-30rc.shutdown should recognize LVM upon LUKS optionIan-Xue Li1
This fixes FS#23889. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30rc: exit with error count, not error sumDave Reisner1
cc199761f assumes that /etc/rc.d scripts will exit with a value of 0 or 1. Since this can't be guaranteed, clamp the return value to 0 or 1 before adding it to the exit value. Note that a lot of /etc/rc.d scripts don't properly exit with 0 or 1, so this is more of a forward looking change in the hope that these scripts are cleaned up. 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 Gundersen2
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-24rc cleaning run rc.d scriptsSebastien Luttringer1
rc helper now call rc.d scripts in root directory with a clean environment. Chosen vars came from init man page. It allows to launch scripts from the command line, as if they had been launched by init Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
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-24rc: fix whitespace in case statementDave Reisner1
2011-04-24rc: exit with a meaningful valueDave Reisner1
2011-04-23Use Makefile to replace install.shDave Reisner4
If we're going to use a Makefile for minilogd, we might as well use it for everything. This has some moving pieces: * fix minilogd rule: minilogd.o is a target dep not a build rule * rename adjtime.cron => adjtime * fixup PKGBUILD to account for changes 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 Gundersen3
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-23umount tmpfs on shutdown if devtmpfs is usedGerardo Exequiel Pozzi1
This fixes FS#19783. [tomegun: some adjustments: - always umount ramfs as we never mount /dev as ramfs; and - don't umount /dev/pts as it might still be useful.] Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-22removed leftover mkdirTom Gundersen1
Signed-off-by: Tom Gundersen <teg@jklm.no>