summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-11-15init_functions: refactor poll_deviceDave Reisner1-11/+12
Beyond stylistic cleanup, add a conditional to ensure that we don't show the 'waiting for device' message if it already exists. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15init: create /run/initramfs after mounting /runDave Reisner1-0/+1
We'll use this as a channel to communicate with later userspace. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15init: don't tell the kernel about the path to modprobeDave Reisner1-2/+0
Remove this ancient relic. It's not been needed in a very long time. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15Makefile: install binaries to /usr/binDave Reisner1-5/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15hooks/resume: Remove grep usageGerardo Exequiel Pozzi1-2/+2
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-15hooks/resume: Remove unused functionGerardo Exequiel Pozzi1-2/+0
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-13update bash completionDave Reisner1-5/+11
- change scavenging of /lib/modules to avoid grabbing extramodules dirs - add missing options for lsinitcpio and mkinitcpio - use _filedir for completing -b Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-30add_symlink: fix argument ordering and add_dir callTom Gundersen1-2/+2
Two bugs: operands were swapped in call to _add_symlink, and missing operand in call to _add_dir. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-10-25mkinitcpio: dereference symlinks when resolving kernverDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-22init_functions: avoid setting var without LHS0.7.5Dave Reisner1-0/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-22init_functions: replace grep/sed with PEsDave Reisner1-12/+13
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-22init_functions: tighten up mount option gatheringDave Reisner1-26/+16
* Directly assign ro or rw to the rwopt rather than using readwrite as an intermediary * Use a default expansion to cut out an if block in determining the root fstype. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-22install/base: include new_root as part of build processDave Reisner2-2/+1
We always need this in early userspace, so add it as part of the build process instead of forking at runtime. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-20install/udev: relocate udevd for udev 174Dave Reisner3-5/+5
- usb_id and path_id are now builtin functionality of udevadm - /sbin/udevd moves to /lib/udev/udevd - update dev PKGBUILD to reflect version requirement Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-20manpage: correct section number in manpage headerDave Reisner1-1/+1
Missed this when I migrated the manpage in 5d635b6d. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16install/pcmcia: fix syntax error (missing &&)Dave Reisner1-1/+1
Fixes FS#26427. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16mkinitcpio: ensure get_kernver always returns a kverDave Reisner1-12/+17
- Always call this function. At worst, just return the current kver. - Do all our error reporting from within the function. - Add an additional check for existance prior to allow for a more appropriate error message when we encounter a situation such as /boot not being mounted. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16mkinitcpio: avoid stomping on TMPDIR from the environmentDave Reisner3-12/+16
cc36db45 was a bit too strict about localizing variables and blew out TMPDIR, which might be a legit variable sourced from the calling environment. Restore this behavior with a bit of refactoring, and additionally add in a check to make sure the temporary directory is writeable before proceeding. Fixes FS#26373. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16move manpage to section 8Dave Reisner2-7/+7
This is an admin command, not a config file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16init: refer to busybox by full path on --installDave Reisner1-1/+1
This is required for busybox 1.19. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-10install/base: grab usb-ehci udev rule to /lib0.7.4Dave Reisner2-2/+2
Done as part of FS#25788. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-09mkinitcpio: avoid using mountpointDave Reisner1-2/+4
As it turns out, the mountpoint toy from util-linux isn't really at feature parity with sysvinit's. In particular, and with respect to v2.20: - It throws false negatives when /proc isn't mounted. Rather, it should fall back on using stat(2), as is the basis for sysvinit's tool. - when /proc is mounted with as source of 'none', it segfaults on a null dereference. Patches have been sent upstream to resolve these issues, but in the meantime, we're mounting /dev and /proc for very specific reasons. Instead of relying on a fork/exec to figure out if these API FS's are mounted, use a simple bash test to see if these specific needs are available within the FS. One of many possible fixes for FS#26344. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-09[mkinitcpio] Add missing groups=('base') in PKGBUILDGerardo Exequiel Pozzi1-0/+1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-09[mkinitcpio] Remove early redirection 2>/dev/null such node does not exists.Gerardo Exequiel Pozzi1-1/+1
An empty file will be created in any case, does not cause any harm, but for correctness. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-01Add a virtio hook0.7.3Sebastien Luttringer1-0/+15
This allow initcpio to boot vm which use virtio as network/disk backend. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-10-01mkinitcpio: avoid creating savelist in main loopDave Reisner1-3/+3
If PRESET is set, we're in the main loop, not a worker process. No image will ever be created here, so there's never a need for saving any build dir. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01example.preset: update for newer style syntaxDave Reisner1-8/+7
We don't suggest sourcing a .kver file anymore, and it can instead be a path to a kernel image. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01remove duplicate "error" in error messageDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01harden version generationFlorian Pritz2-5/+6
If you run make dist, extract that tarball somewhere else and try to run makepkg it will fail because it can't find the git tree anymore. [Dave: removed --dirty flag, as this breaks makepkg] Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-10-01init_functions: use constants on LHS of testsDave Reisner1-3/+3
If we encounter a BOOT_IMAGE var taken from grub2, the first character could be a '(' which will throw off busybox's parser and error out. Reverse the comparison so that the LHS is always a constant, which can be compared to anything (including nothing at all). Fixes FS#26119. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01use correct variable to reference compression methodDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01functions: fix output order in _add_symlinkDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01lsinitcpio: follow symlinks only when necessaryDave Reisner1-2/+4
If the image we're pointing to is a symlink, show the resolution as part of the name in -a's output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01lsinitcpio: disable color when stdout isn't a ttyDave Reisner1-1/+1
This was a copypasta error when taking this from makepkg, which has special concerns in this regard. lsinitcpio should only concern itself with stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01init: allow /run to be mounted with exec permsDave Reisner1-1/+1
This is already done in initscripts so we mirror it here. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01init: support breaks before and after mounting rootDave Reisner1-2/+8
Add in 'premount' and 'postmount' as trigger conditions, but also leave in the old 'y' value as a synonym for premount. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01mkinitcpio: insist that /dev and /proc be mountedDave Reisner1-0/+4
This avoids errors with process substitutions in chroots, among other things. It's important that /proc be checked first as /etc/mtab might be a link to /proc/self/mounts. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: keep going even when a hook isn't foundDave Reisner1-1/+2
Instead of bailing entirely, throw an error, and ensure that we exit with a non-zero status. The user might do something as simple as misspell a hook name which may or may not prevent a useful image from being created. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: explicitly create $BUILDROOTDave Reisner1-0/+3
Avoids explosions if a user has no HOOKS in their config, as seen: https://bbs.archlinux.org/viewtopic.php?pid=966344 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: fix whitespace errors in error messagesDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: simplify setting of SKIPHOOKSDave Reisner1-6/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27ensure local scoping of variablesDave Reisner2-5/+11
Also make sure that simple variables are declared as null strings. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27functions: specify the delimiter to xargsDave Reisner1-1/+2
Without specifying this, xargs will split arguments on whitespace as well as newlines, and will interpret quoting and backslashes. When the delimiter is specified, every character is taken literally and only the given delimiter in honored. This sidesteps issues with broken modalias files as evidenced by a MacBookAir3,1 or the bbs thread below: https://bbs.archlinux.org/viewtopic.php?pid=971853 Also fixes FS#25450. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27functions: perform path lookup for binaries if neededDave Reisner1-1/+25
We used to do this, but it was lost somewhere along the way in fixing up basedir support. Add in a 'pathlookup' function which can do a search within any given basedir. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27functions: refactor get_{base,dir}nameDave Reisner1-7/+8
Make sure these are completely safe for user input. Use the same three step process in both cases: 1) Strip any trailing slash 2) Trim the string according to base/dir request 3) Print the result, defaulting to / if step 2 yielded an empty string Signed-off-by: Dave Reisner <d@falconindy.com>
2011-09-27functions: allow ignoring errors on module additionDave Reisner10-17/+28
We conditionally, but naively, add modules in some of our install hooks, but the kernel may not have these. Note that these modules can fail silently by detecting a '?' suffix on the module name. In conjunction with this, the add_module function now takes a flag, -t or --try, which will ignore module not found errors from modinfo. The config file will also support this syntax. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27base: remove superfluous leading /Dave Reisner1-1/+1
The doubled up leading slashes annoy me in the verbose output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27cleanup and bashify install hooksDave Reisner17-266/+220
No logical code changes -- this is purely a syntactical cleanup and standardization across the build hooks along with ensuring that help messages are wrapped to 80 columns or less. All hooks get the same treatment, adhering to the following style: #!/bin/bash build() { COMMANDS } help() { cat <<HELPEOF This is a help message. HELPEOF } # vim: set ft=sh ts=4 sw=4 et: Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27keymap: simplify unicode detectionDave Reisner2-11/+10
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-24keymap/consolefont: source rc.conf properly from $BASEDIRDave Reisner2-29/+37
This is partially in response to FS#24685, which should hopefully cut back on configuration duplication on non-sysvinit systems. This does, however, also fix a bug with keymap/consolefont pulling the wrong rc.conf when BASEDIR is not '/' or unset. Signed-off-by: Dave Reisner <dreisner@archlinux.org>