Harald Hoyer
20636ce09f
dm: add shutdown script
2011-05-31 15:50:45 +02:00
Harald Hoyer
168fa7e571
base: add shutdown script to be called from systemd
2011-05-31 15:50:43 +02:00
Harald Hoyer
7ed1de2f1d
mount-root.sh: fixed fsck and "-a" only for "ext*"
2011-05-31 14:56:30 +02:00
Michal Soltys
0d8c1d7fa1
95rootfs-block/block-genrules.sh: Use > instead of >>
...
trivial, blocksymlink.sh shouldn't exist at this point.
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:51 +02:00
Michal Soltys
0216d1cda3
95rootfs-block/mount-root.sh: Rely on det_fs and wrap_fsck
...
Use common fsck and det_fs code. Verify filesystem type more
aggressively, which has a chance to be more resistant to
accidental mistakes.
Also, there's no need to generate custom fstab for the sake of fsck
anymore.
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:51 +02:00
Michal Soltys
8b2896f9fa
95fstab-sys: use det_fs and wrap_fsck
...
This patch mainly adds fsck functionality to fstab-sys, with additional
sanity checks (checking for device existence, verifying fstype via
det_fs).
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:50 +02:00
Michal Soltys
e2c5015713
dracut-lib.sh: Add det_fs() and wrap_fsck()
...
Both functions will be used by rootfs-block and fstab-sys modules.
Both are based on code present in mount-root.sh, though few changes are
present.
det_fs:
will try to determine filesystem type for supplied device, even if it's
not auto. If fs cannot be detected, or if the detected one differs from
the supplied one - a warning is issued (so user can fix its stuff later)
wrap_fsck:
will call fsck for specific device with optionally additional
fsckoptions. The function returns fsck return value.
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:50 +02:00
Michal Soltys
e639630da4
dracut-lib.sh: add vwarn() function
...
Similary to vinfo()
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:50 +02:00
Harald Hoyer
9b30d4793d
base/init: do not lazy umount /run
2011-05-20 15:17:32 +02:00
Harald Hoyer
dd483f4f42
base/init: mkdir non-existant dirs
2011-05-20 15:17:32 +02:00
Harald Hoyer
543f39cb52
base/init: save timestamp earlier and remove /sys mount duplicate
2011-05-20 15:17:32 +02:00
Harald Hoyer
4826b9b0d5
base/init: mkdir $NEWROOT, if it does not exist
2011-05-20 15:17:32 +02:00
Harald Hoyer
683db19a7d
base/module-setup.sh: only mkdir /lib, if it does not exist
2011-05-20 15:17:31 +02:00
Harald Hoyer
1021371daf
i18n: disable systemd-vconsole-setup, until the tool is fixed
2011-05-20 15:17:31 +02:00
Harald Hoyer
6a0b3ccf4e
busybox: install busybox to /usr/bin
2011-05-20 15:17:31 +02:00
Harald Hoyer
3da7836035
dracut: fix overlayfs paths
2011-05-20 13:00:46 +02:00
Harald Hoyer
23b28c0ab5
lvm/lvm_scan.sh: remove references to lvm-cleanup
...
lvm-cleanup was removed long time ago
2011-05-17 12:29:47 +02:00
Will Woods
7573ac58f2
Fix "can't shift that many" crash with empty /proc/cmdline
...
If /proc/cmdline is empty (like if root=... is set in /etc/cmdline),
modules.d/99base/init will crash with a message saying "can't shift that
many" right before switch_root. The problem is in the block of code that
tries to look for init args. It does something like:
read CMDLINE </proc/cmdline
[...]
set $CMDLINE
shift
If CMDLINE="" then "set $CMDLINE" will dump all the variables to stdout.
(That should be "set -- $CMDLINE" instead.) Since there's no $1, the
"shift" causes an error, and dracut crashes.
The 'shift' was copy-and-pasted from the previous block. It doesn't
belong here; remove it.
[Harald Hoyer <harald@redhat.com>: corrected commit message]
[Harald Hoyer <harald@redhat.com>: fixed indention]
Signed-off-by: Will Woods <wwoods@redhat.com>
2011-05-17 10:29:48 +02:00
Alan Pevec
f7c05c5514
dmsquash-live/dmsquash-live-root: add missing changes for /run
...
Change to /run/initramfs/squashfs/ was not complete.
2011-05-12 14:28:04 +02:00
Harald Hoyer
29b10e65b1
dracut-functions: make local vars local and prefix with "_"
2011-05-12 11:06:47 +02:00
Harald Hoyer
beb015706b
dracut-lib.sh: warn, even if "quiet" is set
2011-05-11 20:19:13 +02:00
Harald Hoyer
3b403b32fc
removed trailing whitespaces
2011-05-10 11:56:09 +02:00
Harald Hoyer
da5f8554a4
ifcfg/write-ifcfg.sh: do not source net.*.override, if it doesn't exist
2011-05-10 10:55:48 +02:00
Amadeusz Żołnowski
ba902275d5
new module - 91crypt-gpg
...
It's an extension to 90crypt module. Adds support for GPG-encrypted
keys (symmetrically, of course). Module is optional.
2011-05-06 12:23:52 +02:00
Amadeusz Żołnowski
3909d7edfc
crypt: functions for ask-for-password and reading key
...
Asking for password and reading key parts are moved to separate
functions in crypt-lib.sh: ask_for_password and readkey.
2011-05-06 12:23:52 +02:00
Amadeusz Żołnowski
2f95d699dc
crypt-lib.sh: 'command -v' preferred over 'type'
2011-05-06 12:23:51 +02:00
Harald Hoyer
3cf14ae1ae
parse-kernel.sh: wrong index was used in for loop
...
Thanks Mike Snitzer <msnitzer@redhat.com>
2011-05-06 12:06:20 +02:00
Harald Hoyer
7c18802966
iscsi: find iscsi kernel modules by symbol names
2011-05-04 10:19:02 +02:00
Harald Hoyer
424ecce632
plymouth/gensplash: reset tty after plymouth messed with it
2011-05-03 14:49:45 +02:00
Harald Hoyer
6019e1053c
10i18n: do not use console_init shell script, if systemd-vconsole-setup
...
do not use console_init shell script, if systemd-vconsole-setup is
available
2011-05-03 14:49:44 +02:00
Harald Hoyer
aad6898fe4
10i18n: s/systemd-vconsole/systemd-vconsole-setup/g
2011-05-03 10:34:06 +02:00
Harald Hoyer
44110df25a
base/init: remove double nosuid from devtmpfs mount line
2011-05-03 09:59:15 +02:00
Harald Hoyer
c99014d5ef
console_init/plymouth: use systemd-vconsole, if available
...
also init the console before starting the plymouth daemon
2011-05-03 09:59:14 +02:00
Harald Hoyer
ba7457ee00
network/parse-ip-opts.sh: fix ifname for ibft with all args
2011-05-02 11:30:29 +02:00
Harald Hoyer
7b069d5ea7
network/net-genrules.sh: also honor rename events
2011-05-02 11:29:58 +02:00
Marian Ganisin
c34130f705
don't overwrite ifname=
...
[Harald Hoyer <harald@redhat.com>: replaced grep with strstr]
[Harald Hoyer <harald@redhat.com>: handle multiple ifname= arguments]
2011-05-02 11:28:29 +02:00
Marian Ganisin
cc8f077e9f
skip condition fixed
2011-05-02 11:28:22 +02:00
Marian Ganisin
ccacb45c52
correct module name
2011-05-02 11:28:04 +02:00
Harald Hoyer
1325cddee9
let rpc user own /var/lib/rpcbind
...
https://bugzilla.redhat.com/show_bug.cgi?id=698160
2011-05-02 11:27:12 +02:00
Harald Hoyer
80df37f475
fcoe: moved edd detection to settled initqueue
...
At the time of modprobing edd, all pci devices must exist and have to be
initialized for the symlinks to work.
2011-05-02 11:25:13 +02:00
Harald Hoyer
4257798f8a
fips: forward port RHEL-6 fips changes
...
- also support FIPS on separate LVM partition
- use small settle loop to get /boot
- "set -e" has no effect, if we use "||"
- make fips work with encrypted root and seperate boot
- moved to pre-pivot to support /boot in /
2011-05-02 11:15:46 +02:00
Harald Hoyer
12b9736228
dm: add 11-dm.rules for udev-168 and cleanup-db
...
add OPTIONS+="db_persist" to dm devices, to persist through a
udevadm info --cleanup-db
2011-05-02 10:55:44 +02:00
Amadeusz Żołnowski
64fcb3cce7
kernel-modules: inst modules.builtin if there's no modules.builtin.bin
...
Also report failure if none of them exist.
2011-04-28 15:44:54 +02:00
Michal Soltys
336eb5b04c
modules.d/99base/init: missing slash in ismounted check
...
ismounted sys -> ismounted /sys
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-04-28 15:44:54 +02:00
Harald Hoyer
f024bf0dcd
base, crypt: install umount, because it is used
2011-04-20 16:51:39 +02:00
Harald Hoyer
bf512ee2e0
base/init: export RD_TIMESTAMP
2011-04-14 15:23:05 +02:00
Harald Hoyer
6a168568a5
base/init: use "udevadm control --exit" and "udevadm info --cleanup-db"
...
For udev >= 168 use the advanced udevadm features for shutting down udev.
Thanks Kay!!!
2011-04-14 12:00:11 +02:00
Harald Hoyer
dbad9f4661
Move all files to /run/initramfs
...
Given that we boot into a modern Linux distribution with the "/run" toplevel
directory, we can easily mount move the whole /run directory to the real
root in the end and have the complete initramfs later on in
/run/initramfs. All log files and /run states are still accessible and
to save space /run/initramfs can be removed later on.
Because the kernel does not mount a tmpfs on /run prior to unpacking the
initramfs cpio image, we have to copy ourselves very early to a tmpfs
and mount it on /run.
Due to lazy umount the old initramfs binaries should
be removed in the end by switch_root.
This feature can be turned on with "--prefix".
2011-04-12 12:08:50 +02:00
Harald Hoyer
7eb40c488c
base: s#initlog#loginit#g for consistency
2011-04-12 11:07:40 +02:00
Harald Hoyer
2a9b703903
set udev property hookdir
...
Revert "mdraid/65-md-incremental-imsm.rules: s#$hookdir#/lib/dracut/hooks/"
This reverts commit e1f68dc6a0
.
2011-04-12 08:45:31 +02:00
Harald Hoyer
65e0dd452c
base/init: removed rd.copystate
...
all files are available in /run/initramfs
2011-04-12 08:32:03 +02:00
Harald Hoyer
5d7cdc38d0
base/init: removed rd.timestamp and automatically export RD_*
2011-04-12 08:30:33 +02:00
Harald Hoyer
e1f68dc6a0
mdraid/65-md-incremental-imsm.rules: s#$hookdir#/lib/dracut/hooks/
2011-04-11 19:25:00 +02:00
Harald Hoyer
a6c34848eb
base/init: set DRACUT_QUIET based on "loglevel" and "quiet"
2011-04-11 19:24:59 +02:00
Harald Hoyer
182660d864
base/init: set PATH like new kernels do
2011-04-11 13:58:33 +02:00
Harald Hoyer
3fc621ee45
iscsi/mount-lun.sh: use NEWROOT
2011-04-11 13:35:27 +02:00
Harald Hoyer
8234b92d85
crypt/cryptroot-ask.sh: check and use NEWROOT
2011-04-11 13:34:58 +02:00
Harald Hoyer
6822764f25
base/dracut-lib.sh: add ismounted()
2011-04-11 13:34:34 +02:00
Harald Hoyer
0d837ebf2a
base/dracut-lib.sh: turn on PS4 for bash debugging
2011-04-11 13:34:06 +02:00
Harald Hoyer
8f5d36896d
loginit: create pid and kill loginit by pid
2011-04-11 13:17:24 +02:00
Harald Hoyer
e365864bbc
removed switch_root.c
2011-04-11 13:12:30 +02:00
Harald Hoyer
df60555037
precreate /run/udev/rules.d
2011-04-11 13:02:14 +02:00
Harald Hoyer
6730280c5b
crypt/parse-crypt.sh: fixed rule creation
...
"\n" was missing
create rules file on tmp file and rename it later
2011-04-08 13:50:10 +02:00
Harald Hoyer
fb59f4c967
get rid of absolute PATHs
2011-04-08 13:49:06 +02:00
Harald Hoyer
77e2cadd88
base/init: fixed "unset" of vars
2011-04-08 13:27:28 +02:00
Harald Hoyer
a2cb4dbc82
base/dracut-lib.sh:incol2() return 1 on error
2011-04-08 13:27:07 +02:00
Harald Hoyer
36e30eb096
init: s/RDDEBUG/RD_DEBUG/g
2011-04-08 13:26:23 +02:00
Harald Hoyer
03f405bc04
init: move /.die to /run/initramfs/.die
2011-04-08 13:26:02 +02:00
Harald Hoyer
4abb498d79
initqueue: add "--finished"
2011-04-08 13:25:49 +02:00
Alan Pevec
93724aa28f
dmsquash-live: hide plymouth while checking ISO
...
Fixes long-standing FIXME
Latest isomd5sum added an option to abort media check with ESC key,
but that key is taken by plymouth for switching to the detailed log
messages, making it impossible to abort checkisomd5.
Tested in text mode.
2011-04-08 10:54:05 +02:00
Harald Hoyer
2a72df9cf0
busybox/module-setup.sh: do not create absolute symlinks
2011-04-08 10:39:57 +02:00
Harald Hoyer
d125a47061
mkdir always with -m 0755
2011-04-08 10:39:46 +02:00
Harald Hoyer
8daaa46478
loginit: fix loglevel
2011-04-08 10:39:40 +02:00
Harald Hoyer
02c1bd6bb6
fips: add "rd.fips.skipkernel" boot option
2011-04-08 10:27:32 +02:00
Harald Hoyer
1cd1da13da
iscsi: add additional hardcoded modules
...
https://bugzilla.redhat.com/show_bug.cgi?id=692781
https://bugzilla.redhat.com/show_bug.cgi?id=689694
2011-04-08 10:26:33 +02:00
Harald Hoyer
ea8ca78af0
crypt/parse-crypt.sh: fix udev rule creation
2011-04-08 10:23:58 +02:00
Harald Hoyer
dc4fc03e4b
fcoe/parse-fcoe.sh: s#source#.#g
...
dash does not understand "source"
2011-04-08 10:22:59 +02:00
Harald Hoyer
9853774351
base/init: reset PATH after the /run move
2011-03-31 14:10:22 +02:00
Harald Hoyer
79471f365e
base/dracut-lib.sh: changed kmgs log levels
...
New kernel/dmesg understands syslog levels, so we log with "+24" to indicate
that dracut is a daemon (current init).
2011-03-31 13:12:38 +02:00
Harald Hoyer
98b108284c
dmsquash-live/dmsquash-live-genrules.sh: fixed udev rule location
...
Fixed the rule directory to $UDEVRULESD
2011-03-31 08:24:15 +02:00
Harald Hoyer
8ee30d09a4
plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth
2011-03-30 16:24:57 +02:00
Harald Hoyer
01583ae4ad
fips: fixed "boot=<dev>" handling
2011-03-30 14:57:01 +02:00
Harald Hoyer
249f8b5bfc
base/init: fixed compat /dev/.initramfs copy
2011-03-30 03:23:37 +02:00
Harald Hoyer
4ad453445a
base/dracut-lib.sh: relax getargbool value parsing
...
if a non-boolean value was specified, like "yes" or "no",
getargbool() would error, because we check for "$val -eq 0"
2011-03-30 01:45:17 +02:00
Harald Hoyer
e620bb01da
base/init: fix cdrom polling
2011-03-30 00:01:00 +02:00
Harald Hoyer
7931bf0420
plymouth gensplash: check for console_init before calling it
...
Thanks Jon Ander Hernandez!
2011-03-29 16:38:11 +02:00
Jon Ander Hernandez
c174aea07d
Ensure rpc_pipefs is mounted
...
While on some systems (like Fedora) rpc_pipefs is mounted
automatically when sunrpc module is loaded, on Debian based systems it
needs to be mounted manually.
2011-03-29 16:17:03 +02:00
Harald Hoyer
85323dcbb9
40network/dhcp-root.sh: s#initqueue-finished#initqueue/finished#g
2011-03-29 15:46:53 +02:00
Harald Hoyer
dc36969ae1
02caps: changed pre-pivot priority to 00
...
caps should be dropped before any actions with the mounted rootfs happen
2011-03-28 20:33:20 +02:00
Harald Hoyer
ec88eb91d6
10rpmversion/version.sh: version file moved to /lib/dracut
2011-03-28 20:26:29 +02:00
Harald Hoyer
5b2cc025f4
99base/init: fall back to manual cdrom polling
2011-03-28 17:52:33 +02:00
Harald Hoyer
1489c9b1af
40network: make dhclient mandatory again
2011-03-28 17:23:06 +02:00
Amadeusz Żołnowski
86d404513f
40network: install dhclient, brctl and ifenslave optionally
...
Warning given by check() function in case if any of those binaries
doesn't exist was removed, because it's produces by "dracut_install -o"
later.
2011-03-25 16:28:28 +01:00
Amadeusz Żołnowski
d1ef3951f3
modules.d: logging functions adjusted to dracut-logger
2011-03-25 16:22:05 +01:00
Harald Hoyer
e94f4cce47
loginit: log to /run/initramfs/init.log
2011-03-25 16:10:47 +01:00
Harald Hoyer
07fa164e16
loginit: use /run/initramfs/init.log.end as end marker
2011-03-25 16:10:47 +01:00
Harald Hoyer
9e7a3bf242
base/dracut-lib.sh: s/RDDEBUG/RD_DEBUG/g
...
RDDEBUG would be unset by the environment cleanup in init and logging
would be turned off afterwards.
2011-03-25 16:10:47 +01:00
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
e86a6d390d
network: install brctl optionally
2011-03-25 15:44:00 +01:00