Commit Graph

3842 Commits (040)

Author SHA1 Message Date
Harald Hoyer 0b53ca70b6 Move all hooks to "$hookdir"
hookdir=/lib/dracut/hooks for now, to keep the root directory clean
2011-03-25 16:10:46 +01:00
Harald Hoyer c9f1e3d1f4 check for getarg() function before sourcing dracut-lib.sh
make use of "type getarg" to check, if we really need to source
dracut-lib.sh
2011-03-25 16:10:46 +01:00
Harald Hoyer c97e1a76f3 dracut-functions: install udev rules
Install the udev rules to /lib, if the original rule is found there.
2011-03-25 16:10:46 +01:00
Harald Hoyer 94f4923039 mkdir -m 0755
add the missing directory permissions to mkdir
2011-03-25 15:44:00 +01:00
Harald Hoyer e86a6d390d network: install brctl optionally 2011-03-25 15:44:00 +01:00
Harald Hoyer 4af5e99124 move dracut version file to /lib/dracut/dracut-$version 2011-03-25 15:44:00 +01:00
Harald Hoyer 7bfacf2f21 dracut: use readlink for drautbasedir if "-l" 2011-03-25 15:44:00 +01:00
Harald Hoyer e43df9e342 base/init: fixed /dev/.initramfs creation, for no "/run" 2011-03-25 15:43:54 +01:00
Harald Hoyer 52eed26853 dracut: fixed directory handling, if image is created in "/" 2011-03-24 11:30:23 +01:00
Victor Lowther 4b3124ae85 Update PKGBUILD to force backups of /etc/dracut.conf on install. 2011-03-23 11:29:36 +01:00
Victor Lowther 3a71443953 Make compression do The Right Thing based on what is in the config files. 2011-03-23 11:29:36 +01:00
Victor Lowther 5e6c3b035d Update and slightly refactor compression handling.
This adds a --compress= option along with xz support for 2.6.38 and above.
2011-03-23 11:29:13 +01:00
Michal Soltys e5e5c8952d dracut: fix arithemtic ${#VAR[@]} tests
This patch fixes a handful of ${#VAR[@]} tests, which can't be evaluated
as text expressions - the results is always true in such case, because
"0" is non-empty string.

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-03-23 11:25:55 +01:00
Harald Hoyer 19f3a804e7 s#/dev/.run#/run#g
Move things where they really belong to.
2011-03-18 18:23:44 +01:00
Harald Hoyer 519d339233 dracut-logger: don't debug log "return 0" of dlog() 2011-03-17 12:16:33 +01:00
Harald Hoyer 1e64e4939f dracut-logger: turn off xtrace for log messages
Turn off xtrace for log messages and turn it back on, if $debug is set.
2011-03-17 12:13:44 +01:00
Harald Hoyer da22a02130 Makefile: split syntax check from target "check" to "syncheck"
also add syntax check for the bash scripts
2011-03-17 12:12:48 +01:00
Amadeusz Żołnowski 432196aef8 dracut: script adjusted to new logging facility; -v changed
-v meaning has changed. Now it increases verbosity level. -q option has
been added, which decreases verbosity level. Both options might be
specified multiple times.
2011-03-16 21:42:32 +01:00
Amadeusz Żołnowski 46265a9d3e dracut-logger: make $maxloglvl public
$maxloglvl might be useful to check, if expensive informational
operation is going to be logged at all, before executing it.
2011-03-16 21:42:32 +01:00
Amadeusz Żołnowski 1953052994 dracut: install ld.so.conf* with dracut_install instead of cp 2011-03-16 21:42:30 +01:00
Harald Hoyer 0afae1c7ce base/init: for udev > 166 we will create and use /dev/.run/udev/rules.d
See:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=e68b4c2857942257268134cf7028b80f5a6a8103;hp=98ab6a377285d5943563cfa397e8b350e43878ec
2011-03-16 21:24:57 +01:00
Harald Hoyer e7b1b342bf dracut: add "--check=crc32" to xz compression
As mentioned in kernel/Documentation/xz.txt:

...
Notes on compression options

  Since the XZ Embedded supports only streams with no integrity check
  or CRC32, make sure that you don't use some other integrity check
  type when encoding files that are supposed to be decoded by the
  kernel. With liblzma, you need to use either LZMA_CHECK_NONE or
  LZMA_CHECK_CRC32 when encoding. With the xz command line tool, use
  --check=none or --check=crc32.

  Using CRC32 is strongly recommended unless there is some other layer
  which will verify the integrity of the uncompressed data anyway.
...
2011-03-16 21:17:26 +01:00
Harald Hoyer f709fa439b Install dracut-logger and add it to the spec file 2011-03-16 13:56:20 +01:00
Amadeusz Żołnowski 510ef3af84 dracut-logger: convertion to kernel console log level for kmsg 2011-03-16 12:01:42 +01:00
Will Woods bb08c7632a docs: "/conf/conf.d" should be "/etc/conf.d"
The code actually looks in /etc/conf.d; make the docs reflect that.
2011-03-16 12:01:39 +01:00
Harald Hoyer 200c7fd4b2 dracut-logger: wrap dlog to read stdin
Moved dlog() to _do_dlog() and created dlog() which reads from stdin if
no arguments (except the loglevel) are given.

This enables e.g.:

dwarn "This is a warning!"

echo "This is a warning!" | dwarn
2011-03-15 20:51:58 +01:00
Harald Hoyer 4f7654715f dracut: initialize stdloglvl_l 2011-03-15 20:07:01 +01:00
Harald Hoyer 7fc4fb0131 dracut-logger: export _maxloglvl to skip multiple dlog_init() 2011-03-15 20:03:17 +01:00
Amadeusz Żołnowski e103615be2 dracut-logger: logging facility module for build- and boot-time
It's dash compatible to be used also at boot-time. For now it's included
by dracut-functions and replaces functions: dinfo(), dwarning() and
derror(). New options are introduced: -L|--stdlog, and -q|--quiet to
control stderr verbosity. Logging to file or syslog may be controlled by
options set in config file.

Note that code is not adjusted to the meaning of the new logging
functions, yet.

Doxygen formatted documentation (as a proposal, by the way) is included
in dracut-logger.
2011-03-15 19:52:59 +01:00
Harald Hoyer d486e8f607 dracut: add --xz to compress with xz 2011-03-15 19:51:07 +01:00
Harald Hoyer 66fe35eb3e lsinitrd: cope with xz and lzma compressed images 2011-03-15 19:51:07 +01:00
Harald Hoyer 29cfd6c80b syslog: fixed warn() and dwarning() calls 2011-03-15 19:51:07 +01:00
Will Woods fe17f4e86b dmsquash-live: use 'rootfs.img' for rootfs image name
Every image gets handled the same way regardless of filesystem, so
let's use a filesystem-neutral name (rather than adding new
lines for every fstype anyone might want to use).
2011-03-14 16:30:39 +01:00
Andrey Borzenkov 6927f09e1c cryptoroot-ask: limit number of plymouth password requests
Set number ot retries to 5 to align with non-plymouth case.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2011-03-11 11:44:02 +01:00
Andrey Borzenkov 96d1d01572 cryptroot-ask: check that plymouth is running before use
Otherwise there is no way to skip pasword prompt. --has-active-vt
seems to correctly catch also the case when plymouthd is started
but splash is disabled.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2011-03-11 09:43:44 +01:00
Harald Hoyer b151c3b1fe dracut.conf.d/fedora.conf.example: turn off fips again
use dracut.conf.d/fips.conf.example and install it to
/etc/dracut.conf.d/40-fips.conf to turn it on
2011-03-10 21:38:02 +01:00
Harald Hoyer 28eb2436c8 TEST-50-MULTINIC: change /dev/.initramfs to /dev/.run/initramfs 2011-03-10 19:49:08 +01:00
Harald Hoyer 4877bb510e dracut.spec: inc release to 009 prerelease 2011-03-10 19:25:09 +01:00
Harald Hoyer 2aee7e16ac dracut.spec: remove insmodpost module 2011-03-10 19:23:21 +01:00
Harald Hoyer 52881470ee dracut.spec: add caps subpackage 2011-03-10 19:22:40 +01:00
Harald Hoyer 77e607a3a7 prepare for future udev rules.d location
future udev will have rules.d in /dev/.run/udev/rules.d

Also remove compat symlinks, because we want to get rid of these files
anyway.
2011-03-10 19:19:09 +01:00
Harald Hoyer 1e2a167fe6 rootfs-block/mount-root.sh: rename flag file for fsck
/dev/.run/initramfs/fsck -> /dev/.run/initramfs/root-fsck
2011-03-10 19:17:23 +01:00
Harald Hoyer 2d7fe72bbb base/init: copy /init.log with rd.copystate=1 2011-03-10 19:16:29 +01:00
Harald Hoyer 661f9a3451 dracut: let some parameters be specified multiple times
These parameters can now be specified multiple times:
-a|--add
--add-drivers
-m|--modules
-o|--omit
-d|--drivers
--filesystems
-I|--install
--fwdir
-i|--include
2011-03-10 17:22:56 +01:00
Harald Hoyer 8466db967e dracut-functions: add pop() and push() 2011-03-10 17:22:56 +01:00
Harald Hoyer 486a1b9324 dracut: make options position independent
now this is possible:
$ dracut test.img -f
$ dracut test.img '' -f
2011-03-10 17:22:56 +01:00
Harald Hoyer 4fea3ea6f1 dracut: make "-i, --include SOURCE TARGET" work for files, too 2011-03-10 17:22:56 +01:00
Harald Hoyer 529349c66d add caps module, to drop capabilities
This adds the following parameters:
rd.caps=1
	turn the caps module on/off
rd.caps.initdrop=cap_sys_module,cap_sys_rawio
	drop the specified comma seperated capabilities
rd.caps.disablemodules=1
	turn off module loading
rd.caps.disablekexec=1
	turn off the kexec functionality

If module loading is turned off, all modules have to be loaded in the
initramfs, which are used later on. This can be done with
"rd.driver.pre="
rd.driver.pre=autofs4,sunrpc,ipt_REJECT,nf_conntrack_ipv4,....

Because the kernel command line would get huge with all those drivers, I
recommend to make use of $initramfs/etc/cmdline.

So, all rd.caps.* and rd.driver.pre arguments are in caps.conf can be
copied to $initramfs/etc/cmdline with "-i caps.conf /etc/cmdline".

Also all modules have to be loaded in the initramfs via "--add-drivers".

The resulting initramfs creation would look like this:

  --add-drivers "autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 \
  nf_defrag_ipv4 iptable_filter ip_tables
  ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack
  ip6table_filter ip6_tables dm_mirror dm_region_hash dm_log uinput ppdev
  parport_pc parport ipv6 sg 8139too 8139cp mii i2c_piix4 i2c_core ext3
  jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix
  dm_mod" \
  /boot/initramfs-caps.img
2011-03-10 17:22:56 +01:00
Vadim Kuznetsov 80bafe6d36 mkinitrd: fix incorrect basename in mkinitrd usage message
Steps to Reproduce:
1. run mkinitrd -h

Actual results:
$ mkinitrd
usage: /usr/sbin [--version] [--help] [-v] [-f] [--preload <module>]
       [--image-version] [--with=<module>]
        <initrd-image> <kernel-version>

Expected results:
$ mkinitrd
usage: mkinitrd [--version] [--help] [-v] [-f] [--preload <module>]
       [--image-version] [--with=<module>]
       <initrd-image> <kernel-version>
2011-03-10 17:22:55 +01:00
Harald Hoyer 7838ab5010 kernel-modules/module-setup.sh: fix instmods $filesystems
especially in host_only mode, $filesystems was not honored
2011-03-10 17:22:55 +01:00