aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2009-10-06Add hvc0 to inittab (commented by default)Aaron Griffin1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-10-05network: support early 'up' for dhcp interfacesAaron Griffin1
Previous commit acac4f47597320f55995bdaf692d6f2335a1d67e attempted to parse the name of the interface from the config line, but neglected to check for "dhcp" config lines, in which case the interface is the name Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-10-05Always shutdown daemons, regardless of runlevelAaron Griffin1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-24network: Use real interface name for ifconfig upAaron Griffin1
Using the variable name doesn't work in cases like this: my_interface_foo="eth0 blah blah" INTERFACES=(my_interface_foo) It produces errors like so: my_interface_foo no such device Fixes FS#16114 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-24Fix stty/tput usage for columns againJim Pryor1
Cleans up double application of earlier fixes for this issue. Instead of calling $(tput cols 2>/dev/null), we now try tput cols silently to see whether it complains. If not, then we call $(tput cols) with no redirection of stderr. This way, we can get results other than 80. eliminate color when stdout is not terminal Signed-off-by: Jim Pryor <profjim@jimpryor.net> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-21Replace \e with \033 for printfsAaron Griffin1
\e isn't recongized in all shells. This causes issues with the locale.sh script. For completeness, \e is replaced throughout the rc.sysinit script Original-idea-by: David Khunne <stahlheinzkockhausen@googlemail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-26Make the hook-system a bit more usableThomas Bächler5
This patch makes the hook names unique, prefixing them all with the script name (without the 'rc.') It also removes the explicit declarations of all elements of the array, bash assumes "" if they are uninitialized
2009-08-25Implement a hook-system that allows to add custom code to the initscripts at ↵Thomas Bächler5
certain places A function add_hook can be called from functions.d to register a hook function. The existing hooks are based on suggestions from Michael Towers (larch) and on the implementation of initscripts-extras-fbsplash which currently uses the strings passed to stat_busy and stat_done for this. More hooks can be added if requested. The implementation uses associative arrays and will thus only work with bash 4 or later
2009-08-24Remove support for static filesystem and make code in rc.single look like ↵Thomas Bächler2
the code in rc.sysinit/rc.shutdown udev has been a dependency of initscripts for a long time, the system won't work without it anyway. Thus remove the "Using static filesystem" message which does nothing anyway and always try to start udevd At the same time, update the killall5 and udev start code in rc.single
2009-08-24Remove uevent processing benchmark, as it is useless now that we actually do ↵Thomas Bächler1
work between trigger and settle
2009-08-24Use nosuid instead of noexec on /devThomas Bächler1
The last patch caused applications to break that mmap()ed devices with PROT_EXEC It's sad that we can't avoid putting binaries into /dev, but at least we can avoid setuid-binaries being there
2009-08-23Add size and noexec mount options to /dev, change "none" to "udev"Thomas Bächler1
2009-08-22Fix in_array function2009.08-1Thomas Bächler1
In in_array a check might look like [ "!" = "@" ], which will fail because of the !, so make this check look like [ "x!" = "x@" ]. Also, when an entry is prefixed with !, it should be handled as if it was not in the array.
2009-08-22Splint recommended cleanups to minilogdDan McGee1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-22Add minilogd to gitignoreDan McGee1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-22Don't background the udevadm trigger callDan McGee1
This operation doesn't block for more than a half second, and backgrounding it invites race conditions if the settle operation ends up actually getting executed first. My slice won't even boot without this change. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-22Allow skipping of all hardware clock adjustmentsDan McGee4
For virtualized machines, the hardware clock doesn't actually exist, so all hwclock calls fail and print error messages during system startup, shutdown, and the hourly adjtime cronjob. By explicitly looking for HARDWARECLOCK to be set to 'UTC' or 'localtime', all other values will result in hwclock calls being skipped (e.g. set the variable to 'none'). Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-22Remove USEDIRECTISA and associated codeDan McGee3
man hwclock implies this option is rarely necessary, and (almost) all systems Arch supports surely have a /dev/rtc device and load the rtc driver in the kernel. Even if this is not available, hwclock will fall back to direct I/O requests anyway. As a side note, the adjtime cronjob didn't even respect this setting anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-11network: bring interfaces up right away in ifupJames Rayner1
Allow association to begin, for wireless interfaces Ref: FS#13299 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-10Mount /dev as tmpfs instead of ramfs for new udev-145Gerardo Exequiel Pozzi1
* ramfs not support POSIX ACL that is necessary for using with the current udev-145 and make the rule 70-acl.rules usable, when ConsoleKit is available. * tmpfs support POSIX ACL Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-08-10Merge branch 'master' of ssh://archlinux.org/srv/projects/git/initscriptsRoman Kyrylych5
2009-08-07Consistent capitalization of localeAllan McRae1
Make the capitalization "UTF-8" part of the locale field in rc.conf match that used in /etc/locale.gen (FS#15825) Signed-off-by: Allan McRae <allan@archlinux.org>
2009-08-05Enable in_array for prefixed daemonsAaron Griffin1
Previous code has issues with ! and @ prefixed DAEMONS Original-by: Florian Pritz <bluewind@xssn.at> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-05Revert previous commit chunk: in_array fixesAaron Griffin1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-05Fix stty/tput usage for columnsJim Pryor1
This corrects the usage of stty and tput under various non-TTY conditions such as under cron and redirected output. [Aaron: Also corrected my USECOLOR bug I introduced last patch] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-03Fix array syntax for DAEMONS loopAaron Griffin2
Whoops! Noticed-by: Florian Pritz <f-p@gmx.at> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-03Allow creation of bridges with bonded interfacesJonathan Liu1
Ref: FS#10616 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-02Fixed warning about bootbits with encrypted swap and util-linux-ng 2.16Roman Kyrylych1
Afte update to util-linux-ng the following message is shown during boot: mkswap: /dev/mapper/swap: Warning: don't erase bootbits sectors on whole disk. Use -f to force. The change was introduced by this commit: http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commit;h=ff3bed806863d1c2075d0efda70b39ea6af9ecba From man mkswap: -f Force - go ahead even if the command is stupid. This allows the creation of a swap area larger than the file or partition it resides on. Without this option mkswap will refuse to erase the first block on a device with a partition table or on whole disk (e.g. /dec/sda). This change adds -f to mkswap in rc.sysinit to eliminate the warning. Signed-off-by: Roman Kyrylych <roman@archlinux.org>
2009-07-30functions: refactor for non-tty outputAaron Griffin1
This commit should allow rc.d scripts to be run from non-tty's, such as a cron job Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-30Missed a return value check in previous commitAaron Griffin1
Whoopsie Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-30Add _netdev support to netfs (also add glusterfs support)Marco Lima3
The system-wide mount will no longer mount items in fstab marked as _netdev (requires a network device). These _netdev items are handled by the netfs daemon now. Additionally, add support for glusterfs :) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-30Shutdown non-rc.conf daemons first at rc.singleGerardo Exequiel Pozzi1
To match with commit 7f1bd75ee6aaffddf47e704c46fbab5396b7dd19 for rc.shutdown. Flip the order in which daemons are shutdown. First we scan for all daemons that are NOT in rc.conf and shut those down (order is based on ls, so it is dependent on LC_COLLATE). Afterwards, we shut down all daemons in rc.conf, in order. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-30Shutdown non-rc.conf daemons firstAaron Griffin2
Flip the order in which daemons are shutdown. First we scan for all daemons that are NOT in rc.conf and shut those down (order is based on ls, so it is dependent on LC_COLLATE). Afterwards, we shut down all daemons in rc.conf, in order Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-29functions: Add -- to stat_append printfJacob Winther1
printf causes scripts to fail when argument starts with a dash Calling stat_append "- hello" causes the following error: /etc/rc.d/functions: line 99: printf: - : invalid option printf: usage: printf [-v var] format [arguments] [FAIL] Ref: FS#15713 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-29Make dynamic initilization code for consoles.Gerardo Exequiel Pozzi1
This changes the currect code for console initialization to make it dynamic. For example when boot on UML the number of consoles is 15 and not 63. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-07-20Fix rtc device to match current rule in udev-141-4.2009.07-3Gerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-18Fix incomplete elif statement2009.07-2Allan McRae1
Commit 92cbc62e introduced an incomplete elif statement which caues shutdown to fail. Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-18Convert to new initscript to new virtual console scheme2009.07-1Gerardo Exequiel Pozzi2
Just convert vc/N to ttyN in all required places. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2009-06-30rc.conf: Switch to dhcp by defaultAaron Griffin1
More of a sane default. Static config left as example Ref: FS#12670 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-26Don't change hardwareclock if settings unclearGerhard Brauer1
Don't default to 'localtime' if HARDWARECLOCK is not set to UTC. Check explicit values Ref: FS#15263 Edited-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-26Trigger uevents earlierKurt J. Bosch1
Backgrounding the udev uevent triggering right after the launch of the udev daemon allows us to do more in parallel before we wait for uevents to complete (udevadm settle). This should speed up boot Ref: FS#12706 Idea-from: Vahid Hamidullah <vh22@njit.edu> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-12Fix warning when compiling without -ansi flagGerardo Exequiel Pozzi1
Add a #define without checking if already defined (introduced in a2db62cbc2f326c30bfd39be31fe71472b8e47e1 ) Signed-off-by: Gerardo Exequiel Pozzi <djgera@exequiel.ban2.ar> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-12Fix minilogd.c eat memory on buflines>=MAX_BUF_LINESGerardo Exequiel Pozzi1
Do not allocate more memory and leak when buflines>=MAX_BUF_LINES Signed-off-by: Gerardo Exequiel Pozzi <djgera@exequiel.ban2.ar> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-09network: Remove the hotplug_ifup command, the function has been removed a ↵Thomas Bächler1
long time ago
2009-06-07Fix array count/walk in rc.shutdown and rc.single, see #13263Thomas Bächler2
2009-06-07We always mount /sys, thus remove a superfluous check for /sys/block. Also ↵Thomas Bächler2
fixes #14437
2009-06-07Make the daemon shutdown in rc.single consistent with rc.shutdown, see #12978Thomas Bächler1
2009-06-07Remove a useless check of dmesg.log file Signed-off-by: Hugo Doria ↵Hugo Doria1
<hugo@archlinux.org>
2009-04-02Make sure functions ends cleanlyAaron Griffin1
When errexit was set, sourcing functions caused a script to exit. Fix this by using a real 'if' instead of the [ a ] && b syntax. Also, fix the vim modeline :) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-03-10Create /var/lib/misc if it doesn't exist2009.03-2Thomas Bächler1
This is necessary because the filesystem package doesn't currently contain this directory