aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2011-01-26Change copyright and license information2011.01-1Thomas Bächler1
The copyright makes no sense, as a variety of people worked on Arch. Remove it. Clarify that software distributed in Arch is often distributed under licenses different than the GPL.
2011-01-26Fix isLuks checkThomas Bächler1
The check was wrong, every device was treated as LUKS. Also remove the _isluks variable, as now it is not used by the SWAP sanity check anymore.
2011-01-26Change SWAP sanity check to use blkid in favor of cryptsetupThomas Bächler1
This improves the sanity check before overwriting a partition with randomly encrypted swapspace. A device will only be overwritten if blkid finds no valid file system on it, otherwise the process will be aborted.
2010-12-13Use modprobe's --all flag instead of looping.Dave Reisner1
Filter blacklisted modules with a parameter expansion and add an extra conditional to modprobe to only act if the resultant expansion has a value. It's important that no quoting takes place here, or else a variable is defined with a null terminator and which will cause the extra conditional to pass and modprobe will error out. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2010-12-13PATH: export a standard path in rc.sysinitTom Gundersen1
This is usefull for udev and other processes that do not get a PATH set by /etc/profile. The particular choice of paths to export was taken from systemd, the rationale being that systemd is designed to be compatible with all the major distros and in particular with udev. The paths are also the same as set as standard in /etc/profile With this patch we handle the PATH variable similarly to what systemd does (in their case the variable is set in init). Signed-off-by: Tom Gundersen <teg@jklm.no>
2010-12-13Add support for serial consoleGerardo Exequiel Pozzi1
9600 because is the default speed when no other parameter than console=ttyS0 is used. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-12-07Unify capitalization of 'Udev'Dan McGee1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-06cryptsetup: print name of device being openedHeiko Baums1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2010-12-06cryptsetup: abort if LUKS is found on swap partitionHeiko Baums1
Variable was not set before use, so the check for LUKS always failed. As noted, this could be dangerous. Signed-off-by: Tom Gundersen <teg@jklm.no>
2010-12-06cryptsetup: read keys for non-root LUKS partitions as raw data from block deviceHeiko Baums1
For LUKS encrypted root partitions it is possible to store a keyfile hidden as raw data onto a USB stick with the dd command. This has the advantage, that the key is saved on a USB stick, but can't be found be just mounting the USB stick. The appropriate line in /etc/crypttab is similar to the kernel parameter in /boot/grub/menu.lst: home/dev/sdaXBLOCKDEVICE:OFFSET:SIZE [teg: fixed whitespace and expanded paths to binaries] Signed-off-by: Tom Gundersen <teg@jklm.no>
2010-12-06cryptsetup: fix indentationTom Gundersen1
It now follows the vim modeline at the bottom of the file.
2010-12-06lvm: enable/disable monitoring of lvm2 groupsTom Gundersen2
Monitoring does not work when /var is mounted ro, so only enable monitoring when we know that /var is rw. Thanks to Thomas Bächler for pointing this out.
2010-12-06lvm: run vgchange in sysinit modeTom Gundersen2
This avoids problems with lack of rw filesystems. Solves: #FS18153.
2010-12-06mount: forbid suid,exec,dev from /proc and /sysTom Gundersen1
2010-12-06locale: set the sysfs value default_utf8 rather than enabling/disabling utf8 ↵Tom Gundersen1
in locale.sh This should go some way towards obsoleting /etc/profiled.d/locales.sh (FS#20911). The remaining, and admittedly main, obstacle is proper inheritance of LANG, which Roman is working on.
2010-12-06udev: do not copy /lib/udev/devices/* to /devTom Gundersen1
this is done by udev since version 155
2010-12-06udevadm: retry failed udev events after filesystems have been mountedTom Gundersen1
No FS reference, but this is what is done upstream (in udev's systemd service files).
2010-12-06udevadm: trigger events of type subsystems as well as devicesTom Gundersen2
The standard type to trigger is devices. This patch makes the type explicit and also triggers events of type subsystems. This is what is done upstream (in udev's systemd service files).
2010-09-08rc.sysinit: condense calls to mkdir and chmodDave Reisner1
2010-09-08Fix two typos introduced by the latest patch seriesThomas Bächler2
2010-09-07Remove a redundant subshell, see FS#20016Thomas Bächler1
2010-09-07restrict NETWORK_PERSIST to runlevel 0 and 6Florian Pritz1
Signed-off-by: Florian Pritz <bluewind@xssn.at>
2010-07-23Add a PKGBUILD for building initscripts-git for testing.Victor Lowther2
This builds straight out of a git checkout. Add generated packages to .gitignore
2010-07-23Trivial bashification of network script.Victor Lowther1
2010-07-23Bashify adjtime.cronVictor Lowther1
2010-07-23Bashify netfsVictor Lowther1
2010-07-23Rewrite /etc/crypttab processing.Victor Lowther3
Split out reading /etc/crypttab and procssing the individual lines into their own helper functions, and bashify the resulting shorter code. Processing this file is still ugly, though. :(
2010-07-11Bashify rc.sysinit, part 1Victor Lowther1
Use bash-style conditionals when setting up the hardware clock. Trying to stick with POSIX syntax only just slows things down. Bashify module loading in rc.sysinit. bashify bringing up the loopback adaptor. Simplify test to see if we should assemble arrays at startup find has a builtin delete action. Use it instead of exec'ing rm. Flatten adding persistent rules.
2010-07-11Bashify rc.shutdownVictor Lowther1
Shorten domainname conditional execution. Use parameter expansion instead of dirname. Clean up entropy pool saving and system clock saving. Flatten LVM deactivation if block
2010-07-11Both rc.single and rc.shutdown use the same code to kill everything.Victor Lowther3
Simplify it, and move that shared code into functions. Parsing the output of ls is Bad, especially when globbing works just as well and does not get confused by odd characters in filenames. bash has arithemetic for loops. Use them instead of while loops for iterating over arrays.
2010-07-11Bashify rc.single.Victor Lowther1
2010-07-11Bashify rc.multiVictor Lowther1
Change the daemon running loop to use a case statement. This is shorter and easier to read. Quote daemon names. Someday, someone may have a daemon name with a space in it.
2010-07-11Finish bashifying functions.Victor Lowther1
Slightly simplify hook-running infrastructure. Go ahead and declare add_hook and run_hook as readonly functions to prevent hooks from overwriting them. Too bad bash does not have lexically scoped variables -- if it does, we could do the same with the hook_funcs associative array. If $CONSOLEFONT is not declared, then just return out of set_consolefont. We do this early so that the entire body of the function is not in an if block. Replace trivial use of grep with bash regex conditional. Bash has regex support, and it allows us to replace most trivial uses of sed, grep, and awk. The fewer processes we create, the faster we go, and every little bit helps. I also think it is more readable to use a bash regex for the trivial stuff. Replace if statement with parameter expansion. ${foo:+-p ${foo}} expands to nothing if foo is not set, -p $foo if foo is set. Replace slightly too long echo staement with a here document. This adds a line, but making things more readable is worth it. Make sourcing functions.d files a tiny bit shorter and faster.
2010-07-11Simplify in_array.Victor Lowther1
All that extra checking for the first character being @ is not needed, simple parameter expansion will trim it off if it is there.
2010-07-11Clean up status() function.Victor Lowther1
Calling your args with $* will do nasty things if any of your args has a space in it. "$@" will always do The Right Thing. Just test the command directly, don't run it and then grab its exit value.
2010-07-11A little creative parameter expansion simplifies stat_die().Victor Lowther1
2010-07-11Bashify initscripts.Victor Lowther1
We rely on bash specific features (arrays and associative arrays). Trying to maintain POSIX compatibility is a net performancle loss, since native bash constructs tend to perform better and lend themselves to less buggy code. Start off by adding #!/bin/bash to the top of functions to make it clear that we are not POSIX, and to help text editors perform appropriate syntax highlighting. Tighten up the console size finding code a bit, and simplify the code that clears USECOLOR. Use [[ ]] instead of [ ] for conditional checking when running in bash. It is worth 10 - 30% speedup whenever you want to compare something. Instead of calling a command and then testing for nonzero exit status, just test the command exit status directly.
2010-07-06Use findmnt to make mtab2010.07-1Gerardo Exequiel Pozzi1
Use findmnt command new in util-linux-ng 2.18 to make mtab based on /proc/self/mountinfo. Otherwise use current method. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> (added a check whether /proc/self/mountinfo exists -- Thomas)
2010-06-09network, rc.conf: Add NETWORK_PERSIST option2010.06-2Thomas Bächler2
Setting NETWORK_PERSIST="yes" will skip network shutdown. This is needed to cleanly halt or reboot the systemif your root device is on NFS. It does not affect network profiles.
2010-06-09Initialize /etc/mtab by copying /proc/mountsThomas Bächler1
Our current process of initializing /etc/mtab is hackish and probably error-prone, replace it by simply copying /proc/mounts.
2010-06-09Rewrite early RTC device creationThomas Bächler1
Creating the RTC device will result in an error if devtmpfs is used, as it already exists after loading the module. The new code skips the mknod if the device is already present. Additionally to rtc-cmos, we now also try to load rtc and genrtc, as some custom kernels use the "old" misc RTC device instead of the newer RTC class. In this case, the created device is also different. This should fix FS#18078.
2010-06-08Do not redirect the standard error of fsck to /dev/null by defaultThomas Bächler1
This sets FSCK_STDERR to /dev/stdout, but still makes it possible to override this behaviour in a hook.
2010-06-06Add nodevtmpfs at rc.shutdown when umountGerardo Exequiel Pozzi1
To avoid message about busy filesystem. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-06-03Add --action=add to udevadm trigger2010.06-1Thomas Bächler2
This is necessary as the new udev defaults to --action=change which breaks network device renaming.
2010-06-03Only mount /proc, /sys and /dev if they haven't been mounted already, use ↵Thomas Bächler1
devtmpfs instead of tmpfs if supported by the kernel
2010-05-18Include _netdev option in NETFS list when calling fsckDan McGee1
We don't want fsck looking at any network device, and we would otherwise check things like iSCSI devices during boot before the network was up. This doesn't quite work. Fixes FS#17887. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Remove bashism from inittab2010.05-3Dan McGee1
Fixes FS#19311, use POSIX compliant stdout/stderr redirection. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Bring back \e(K to locale.shRoman Kyrylych1
See FS#18759 for more details. Signed-off-by: Roman Kyrylych <roman@archlinux.org>
2010-05-03Apply 'encryption: Look for cryptsetup in various places' to rc.shutdown as well2010.05-2Thomas Bächler1
2010-05-03encryption: Look for cryptsetup in various places2010.05-1Thomas Bächler1
The cryptsetup binary will move to /sbin/cryptsetup and the static binary will be removed. Add code that will try /sbin/cryptsetup first, then /usr/sbin/cryptsetup and fall back to the old /sbin/cryptsetup.static if everything else fails.