Commit Graph

28 Commits (3c20ac5377e930c82aaaa59516174bc45e8a93d0)

Author SHA1 Message Date
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Hari Bathini 05d2a14526 lsinird: Adding option "-m|--mod" to list dracut modules in the image
This patch adds option "-m|--mod" to lsinitrd to list dracut
modules in the image  because sometimes  having an option to
only list the dracut modules in the image could be handy.

Sample output:
--------------

[hbathini@localhost dracut]$ sudo ./lsinitrd.sh initramfs-3.11.10-100.fc18.x86_64.img -m
Image: initramfs-3.11.10-100.fc18.x86_64.img: 33M
========================================================================
Version: dracut-029-1.fc18.2

dracut modules:
i18n
network
ifcfg
drm
plymouth
btrfs
crypt
dm
dmraid
kernel-modules
lvm
mdraid
cifs
iscsi
nfs
resume
rootfs-block
terminfo
udev-rules
biosdevname
systemd
usrmount
base
fs-lib
shutdown
========================================================================

Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
2014-06-20 14:34:30 +02:00
Tobias Geerinckx 773d6a7ded lsinitrd.sh: don't choke on LZO-compressed images
lsinitrd (and hence dracut) currently fail to list the contents of any
LZO-compressed image, and merely spit out misleading xzcat errors.

I guess no-one actually uses them.
2014-06-20 14:34:29 +02:00
Harald Hoyer fd9f902477 lsinitrd.sh: prevent < <$() construct
Running dracut in a chroot environment, which has /dev not correctly
setup will result in errors like:

/usr/bin/lsinitrd: line 164: /dev/fd/62: No such file or directory
cpio: Malformed number �5�OK��
cpio: Malformed number 5�OK��
cpio: Malformed number �OK��

This is because bash wants /dev/fd/<num> for constructs like:
foo < <$(bar)
2014-04-01 08:21:49 +02:00
Alexander Tsoy 8a2db478de Add legacy flag (-l) to lz4 and update magic number
Linux kernel does not support the new default lz4 format.

https://bugs.gentoo.org/show_bug.cgi?id=502102
2014-02-26 14:55:54 +01:00
Harald Hoyer b208aad51c lsinitrd.sh: make use of the skipcpio utility
With the skipcpio utility, the whole contents of an initramfs with an
early cpio image can be displayed.
2014-01-24 15:30:22 +01:00
Harald Hoyer ae01bd1808 lsinitrd.sh: also print out the arguments used to create the initramfs 2014-01-24 12:49:17 +01:00
Koen Kooi 149965bd13 dracut-initramfs-restore,lsinitrd: add LZ4 support
Dracut claims to have LZ4 support, but trying to use it will result in an xzcat failure at the end due to missing CAT support.

The lz4 command chokes on '--', so abstract that out into the CAT select.

Something similar will need to be done for LZO.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2014-01-24 12:49:16 +01:00
Harald Hoyer 861d9430c0 lsinitrd.sh: fixed modules.txt path 2013-08-12 23:50:07 +02:00
Harald Hoyer d93fe0fa35 lsinitrd.sh: fixed case 2013-08-09 15:35:20 +02:00
Harald Hoyer 1cb6524918 lsinitrd.sh: add old cpio signature 2013-08-05 11:14:24 +02:00
Harald Hoyer b093aa2dc7 beautified shell code
checked with shellcheck http://www.shellcheck.net/about.html
2013-07-04 12:31:15 +02:00
Harald Hoyer 4460416abc lsinitrd.sh: do not output filename for a single file 2013-04-16 13:36:04 +02:00
Harald Hoyer 884e1cda7c lsinitrd: drop use of "file" 2013-04-16 13:04:21 +02:00
Harald Hoyer 7d9bb76ac7 lsinitrd: switch to getopt and add "-f" and "-k" parameter 2013-04-16 11:32:31 +02:00
Harald Hoyer d26bd6ca55 lsinitrd.sh: simplify check for boot loader spec dirs 2013-03-13 09:32:14 +01:00
Harald Hoyer d928724c3c lsinitrd.sh: removed trailing "}" 2013-03-11 15:46:37 +01:00
Harald Hoyer 727e68d0b5 lsinitrd.sh: fix for default initrd not found, but image given 2013-03-11 15:13:02 +01:00
Harald Hoyer dde2db3da9 lsinitrd: use /boot/<machine-id>/<kernel-version>/initrd as the default image
if /boot/<machine-id> exists; then
use /boot/<machine-id>/<kernel-version>/initrd as the default image;
else fallback to /boot/initramfs-<kernel-version>.img
2013-03-07 13:03:24 +01:00
Harald Hoyer 6d70aa7836 lsinitrd.sh: sort by filename 2012-10-16 10:25:10 +02:00
Harald Hoyer c072e13162 get rid of "basename" 2012-07-24 14:12:36 +02:00
Harald Hoyer a85ee030ab lsinitrd.sh: fixed version file extraction 2012-07-03 18:24:21 +02:00
Harald Hoyer d8caa679e0 lsinitrd.sh: get rid of awk call 2012-07-03 18:23:59 +02:00
Harald Hoyer f7bccf3724 lsinitrd.sh: print usage for -?, -h 2012-07-03 18:23:27 +02:00
Nikoli 25ff71b0c7 lsinitrd: support symlinks 2012-04-17 11:54:27 +02:00
Harald Hoyer bdb818997d lsinitrd: handle LZMA file type 2012-04-03 09:19:48 +02:00
Harald Hoyer b5c2fc1141 lsinitrd.sh: no "" for shell regex 2012-03-29 14:36:43 +02:00
Harald Hoyer 552ecca6db Renamed all shell scripts to *.sh 2012-02-22 15:15:21 +01:00