summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-05-12mkinitcpio: remove --basedir optionDave Reisner8-88/+45
This option is just a bad idea. Initramfs creation is too important to get wrong, and running it from outside the root FS has too many gotchas, the worst of them being: - where do you pull hooks from? - how do you resolve binary dependencies within the root? In general, dealing with the extra luggage of the base directory makes the codebase more complicated than it needs to be (see all the '_' prefixed functions which are called from add functions). In favor of simplifying the code, and making it more maintainable, kill this off and force the sane option of chroot'ing into an install if the need arises. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-03remove 'net' hooks. these belong to mkinitcpio-nfs-utils0.8.8Dave Reisner2-193/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-03functions: firmware is now in /usr/libMatthew Monaco1-2/+2
2012-05-02ensure that cmdline added hooks are run properly in early initDave Reisner2-4/+15
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-02lsinitcpio: fallback on 80 cols when tput failsDave Reisner1-0/+3
This only happens when the terminfo file is missing, but its a simple fix. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-02fsck: try harder to find fsck binariesDave Reisner1-2/+2
fsck binaries might be outside of /sbin -- glob on all the common paths. This almost matches what we use for util-linux's fsck search path, but we omit the oddball /sbin/fs and /sbin/fs.d directories. Note that this only affects non-autodetect images, since autodetect resolves fsck helpers directly by name. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-28init_functions: remove non-devtmpfs caseDave Reisner1-6/+2
devtmpfs is no longer supported elsewhere, so this is essentially dead code. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-28init_functions: add support for PARTUUID tagsDave Reisner1-13/+6
libblkid (and thus blkid) gain support for this in util-linux 2.22. This block gets refactored slightly to cut out the monotony. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22functions: align error output with GNU getopt_longDave Reisner1-8/+7
Display the name of the program. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22functions: add missing local for iteratorDave Reisner1-0/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22bash-completion: avoid using cdDave Reisner1-4/+19
Introduce _files_from_dir, which loops over arguments to find files in the given directories. Additionally allow passing a flag which will strip suffixes from any found files. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22mkinitcpio: check return of cd before listing hooksDave Reisner1-2/+2
$ mkinitcpio -L ==> Available hooks /usr/bin/mkinitcpio: line 173: cd: /lib/initcpio/install: No such file or directory sort and dedupe as well, since we deal with a hierarchy which may (for some horrible reason) contain duplicates. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22mmc: add install hookDave Reisner1-0/+19
Thanks to Radoslaw Nadstawny (Rad3k) for writing this. Satsifies FS#21022. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22create lsinitcpio symlink for bash completionDave Reisner1-0/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22lsinitcpio: avoid exiting from usageDave Reisner1-4/+4
Print a more helpful message when no image is specified. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22lsinitcpio: show file sizes in analyze outputDave Reisner1-3/+28
Always display the file size on disk, but also display the uncompressed size for compressed images. Borrows my own size_to_human function from paccache and elsewhere. Before: ==> Compressed with: gzip -> Compression ratio: .377 -> Estimated decompression time: 0.058s After: ==> Size: 2.67 MiB ==> Compressed with: gzip -> Uncompressed size: 7.07 MiB (.377 ratio) -> Estimated decompression time: 0.059s Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22mkinitcpio: dont exit from usageDave Reisner1-2/+2
Additionally, exit zero after returning. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22mkinitcpio.8: manpage cleanupDave Reisner1-2/+2
tweak styling of synopsis and link to lsintcpio in SEE ALSO Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22Add manpage for lsinitcpioDave Reisner3-3/+69
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22lsinitcpio: adopt parseopts for option parsingDave Reisner2-21/+41
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22mkinitcpio: adopt parseopts for option parsingDave Reisner3-85/+132
Updates the doc and bash-completion, as well. Also adds the previously unmentioned -A option to the --help output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-20functions: add parseopts for longopt funDave Reisner1-0/+138
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-18gitignore: ignore the right manpage sectionDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-18bash-completion: align whitespace with rest of repoDave Reisner1-38/+38
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-16mkinitcpio: refuse to run without hooks definedDave Reisner1-0/+4
This still doesn't solve all our problems, but it gets us closer. There's no point in creating an image if HOOKS aren't present as this is the bread and butter of any sane mkinitcpio recipe. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-16mkinitcpio: refer to /usr/lib/modules uniformlyDave Reisner1-5/+5
This should have been done as part of b65cf9cd9. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09btrfs: delete hooks -- these belong to core/btrfs0.8.7Dave Reisner2-22/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09hooks: use consistent shebang, modeline, function styleDave Reisner3-10/+15
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09mdadm: fix raid[456] autodetectionDave Reisner1-1/+1
20509ade neglected to filter the raid456 module when detecting raid[456] arrays, which lead to non-bootable systems from the autodetect-enabled image. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-04hooks: remove pcmcia hookTom Gundersen1-22/+0
This hook has been moved to the pcmciautils package. Signed-off-by: Tom Gundersen <teg@jklm.no> Acked-by: Dave Reisner <d@falconindy.com>
2012-04-04fix pcmcia /usr moveTobias Powalowski1-3/+3
2012-04-02create /lib as a symlink to /usr/lib0.8.6Dave Reisner2-1/+2
This makes us a little more future proof as far as moving files around. No need for 2 lib/ directories in early userspace anyways. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02base: move usb modprobe rule to /usr/lib/modprobe.dDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02shutdown: detach all loop devices before umountingDave Reisner1-0/+6
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02shutdown: refine umount_all logicDave Reisner1-3/+3
remove the mountpoint filtering from the awk processing and drop the -l flag from umount. Not clear why either of these were present -- they're both wrong. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02autodetect: simplify mdadm autodetectionDave Reisner1-23/+5
Everything we need to know about the devices is already in sysfs attributes for the md devices. Read any found nodes for raid levels and sort them into our whitelist. This removes the need for root in order to "scan" arrays. More code churn on top of d11ba00. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02mkinitcpio: hardcode a sane PATHDave Reisner1-3/+3
Avoid pulling insane apps from user added PATH elements. FS#29162 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02add minor tweaks to make testing a bit easierDave Reisner2-2/+3
Since INSTDIR and HOOKDIR are understood as arrays now, declare them as such with the local 'hooks' and 'install' first to override the local FS. This makes the missing udev error go away and allows easier testing of other out of tree hooks. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02shutdown: improve handling of dm devicesDave Reisner1-4/+8
- use the 'remove' action for cryptsetup rather than luksClose - handle dm devices with dmsetup, not lvm - disable dmraid devices by name, instead of all at once Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02init_functions: fix missing * in fsck messageDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02init: fix location of udevdDave Reisner1-2/+2
We've gotta stop moving this around... Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-28fsck: leverage blank /etc/fstab included by baseDave Reisner2-2/+2
Since 3b18c9cd we have a blank /etc/fstab in the image. This is also forward thinking for the next release of util-linux (2.22), where fsck complains loudly about my filthy hack of using /dev/null as /etc/fstab. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-26shutdown: disassemble devices on shutdownDave Reisner2-1/+65
sysfs contains enough information about block devices to be able to determine the order of stacked devices such as lvm, raid, or crypto. By looking at the device symlinks from the holders/ attributes of a block device, we can walk down each device chain until we reach the most descendant device. For each of these devices at the end of a chain, detect its type and perform the appropriate action to disassemble it. Then, walk back up the device chain, disassembling each parent device. To save ourselves some pain and make sure we're fairly accurate, lsblk is brought in for detection of device types. Thanks-To: Florian Pritz <bluewind@xinu.at> Thanks-To: Tom Gundersen <teg@jklm.no> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-26shutdown: add vim modeline, fix whitespacingDave Reisner1-13/+15
Make this consistent with the rest of the codebase. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-24Makefile: simplify 'make dist' target0.8.5Dave Reisner1-9/+6
- Use git-ls-files and bsdtar to create the archive rather than using git-archive and an temporary directory. - Remove the tarball target. 'dist' is more common. - Remove the 'clean' dependency from dist. Our dependencies are sufficient higher up that touching the Makefile or the asciidoc input will trigger a doc rebuild on changes. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-24init_functions: fix tag resolution w/o udev rulesDave Reisner1-10/+9
The combination of the udev+mdadm hooks plus a tag based root= would cause resolve_device to fail because it immediately looked for a udev symlink which would never be created. The proper fix is to get rid of the mdadm hook and to always use mdadm_udev (which should be merged into mdadm), but this might come back and bite us again. The new solution doesn't assume that udev rules exist and tries blkid first. If the device doesn't (yet) exist fall back on a udev symlink if udevd is running. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-24move bash completion to /usr/share/bash-completionDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-24natively support locale.conf and vconsole.confDave Reisner2-7/+26
This is implemented for the keymap and consolefont hooks. It's done in such a way that vconsole.conf and locale.conf will override and supplement rc.conf. Implements FS#29022. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-24init_functions: support fsck.mode= cmdline parameterDave Reisner1-0/+6
Possible options are 'skip' and 'force' which are synonyms for fastboot and forcefsck, respectively. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-24init_functions: avoid special treatment for forcefsckDave Reisner1-2/+1
I don't want to make a habit of treating cmdline opts as special if they don't need to be, and this is a case where some simple PE magic can be substituted. Signed-off-by: Dave Reisner <dreisner@archlinux.org>