summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-05-18Merge branch 'master' of https://projects.archlinux.org/git/initscripts into ↵2011.05.2parabolaNicolás Reynolds
parabola
2011-05-12releasing: update instructinos after going through it onceTom Gundersen
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 printingSebastien Luttringer
- 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 Gundersen
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 Luttringer
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 Pozzi
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 Gundersen
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 Gundersen
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 Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-04Merge branch 'master' of https://projects.archlinux.org/git/initscripts into ↵Nicolás Reynolds
parabola
2011-04-30Merge remote-tracking branch 'seblu/master'Tom Gundersen
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 Pozzi
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 Pozzi
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 Li
This fixes FS#23889. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30rc: exit with error count, not error sumDave Reisner
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 Maloney
/devshm -> /dev/shm Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-26fixup: umount tmpfs on shutdownTom Gundersen
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-25Merge branch 'master' into parabolaNicolás Reynolds
2011-04-25Parabola rebranding2011.04.1Nicolás Reynolds
2011-04-24rc cleaning run rc.d scriptsSebastien Luttringer
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 Gundersen
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 Reisner
2011-04-24rc: exit with a meaningful valueDave Reisner
2011-04-23Use Makefile to replace install.shDave Reisner
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 Gundersen
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 Gundersen
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 Gundersen
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 Gundersen
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 Pozzi
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 Gundersen
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-22remove trailing whitespace in rc.confAllan McRae
I win the price for the most trivial patch! Signed-off-by: Allan McRae <allan@archlinux.org>
2011-04-22Cleanup stat_busy vs statusTom Gundersen
Minor cleanups, no functional change. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-21Drop old /sys/kernel/uevent_helperSebastien Luttringer
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-21release: automate and documentTom Gundersen
Add a brief description of how to release initscripts. Also automate the creation of the tarball using "make release". Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-21Use a Makefile and clean up install fileDan McGee
Use a Makefile to compile, rather than a call to gcc in install.sh. This allows make's implict rules to take care of CFLAGS, LDFLAGS, CC, etc. Use `set -e` in the install file rather than needing '|| exit 1' on every single operation. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-21Clarify DAEMON_LOCALE descriptionDan McGee
This was horribly worded, in that it seemed like one should put an actual locale value into the variable. In reality it should have been named USE_DAEMON_LOCALE, but since we can't change that now, make it very clear a 'yes' or 'no' is expected and nothing else. [tomegun: removed typo] Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-16Fix and clean forcefsk detectionSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-04-16Add an rc helperSebastien Luttringer
This is allow a quick calling to /etc/rc.d scripts by calling a shell command. By example, starting sshd and gpm can be done by typing: rc start sshd gpm rc can also list available scripts and show which is started/stopped in DAEMONS [tomegun: fixed detection of autostart of background services] Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-15Fix incomplete daemon detection in have_daemonSebastien Luttringer
A daemon is an executable _file_ in /etc/rc.d. Directory like functions.d is not a daemon. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-04-15Fix console verbosity and add config via rc.confSebastien Luttringer
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 Luttringer
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 Gundersen
Fixes FS#23309. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-13Move /var/run/daemons to /run/daemonsSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-13/run: mount /run if it is not already mountedTom Gundersen
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>
2011-04-11fix syntax error from 71a1b74eb778540d412705b09a24f1d2ba123a2bSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-04depmod: no longer update module dependencies on bootTom Gundersen
This should not be necessary as the packages installing modules should be responsible for updating the dependencies. Furthermore, as modules can be loaded very early in boot, but depmod can only be called after root is mounted rw, we can not rely on depmod fixing broken module dependencies. Fixes: FS#20174. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-04dev: create pts and shm directoriesTom Gundersen
Creates the mountpoints for the standard api filesystems in /etc/fstab. At the moment this is already done by /lib/udev/devices in our udev package. However, with this change it is possible to boot a fully working system with the udev unaltered from upstream. For the future, this patch allows us to get rid of the /lib/udev/devices directory from the udev package alltogether. v2: simplified after suggestion from Dave. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-04workaround: do not set property=STARTUP=1 when calling udevadmTom Gundersen
This was needed to properly deal with dm devices being created in initrd. However, the lvm2/devicemapper rule files no longer use this property and now contain a proper fix. By grepping through /lib/udev/rules.d I could not find any other rule file using this property. Finally, the startup script submitted to systemd by the udev maintainer does not set the property, and there has not been any bug complaints about this. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-04workaround: do not unset NIS on shutdownTom Gundersen
If this bug is still present (after more than 4 years) it should be reported and fixed in syslog-ng. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-04workaround: do not rmmod psmouseTom Gundersen
If this bug is still present (after more than 4 years) it should be reported and fixed in the kernel. Dave points out that this was fixed by kernel commit a1cec06177386 (which is in 2.6.21 and was backported to at least 2.6.19.6). Signed-off-by: Tom Gundersen <teg@jklm.no>