Commit Graph

1322 Commits (0635530dda6e12e2475b43bd65ca4943ce36a7e7)

Author SHA1 Message Date
Will Woods 6e3cc00f48 add initqueue --env and "online" hook
The "online" hook runs whenever a network interface comes online (that
is, once it's actually up and configured).

The initqueue --env argument is used to set "$netif" to the name of the
newly-online network interface.
2012-03-08 11:05:29 +01:00
Will Woods 25aa3c5a6e network: refactor stuff from netroot/parse-ip-opts to net-lib
Add new functions: all_ifaces_up, get_netroot_ip, ip_is_local, ifdown,
setup_net, set_ifname, ibft_to_cmdline

Use them in netroot.sh and parse-ip-opts.sh.

There's also a couple little unrelated cleanups.
2012-03-08 11:01:40 +01:00
Harald Hoyer 4d518aec86 move wait_for_loginit() to dracut-lib.sh 2012-03-08 11:00:29 +01:00
Harald Hoyer 74db72dd0b 98pollcdrom: factored out the ugly cdrom polling in the main loop 2012-03-08 11:00:29 +01:00
Harald Hoyer 4fed3ddf16 add "initqueue/*" to hookdirs and create them in dracut itsself
now we can just use
    inst_hook initqueue/settled 99 "$moddir/pollcdrom.sh"
2012-03-08 11:00:29 +01:00
Harald Hoyer 2c0317213e get rid of /tmp/root.info 2012-03-08 11:00:29 +01:00
Harald Hoyer 5861184e87 ifup.sh: check for "-m" to set manualup 2012-03-08 11:00:29 +01:00
Harald Hoyer af8c8ed9f6 40network/net-genrules.sh: move ifup in the initqueue 2012-03-08 11:00:29 +01:00
Will Woods b43d651511 fix apply-live-updates failing because of /lib symlink
Since cp won't copy a directory over a symlink, any updates that were
supposed to go into e.g. /lib would get dropped if you had /updates/lib
as an actual directory, but the target system had /lib->/usr/lib.
2012-03-08 10:58:42 +01:00
Will Woods 66666c670a write-ifcfg.sh: add UUID=.. and save the lease files with the same uuid
As described in https://bugzilla.redhat.com/show_bug.cgi?id=541410#c2,
if you want NetworkManager to take over an interface that you're using
for NFS root (or other network root device), you need to:

a) set UUID=<uuid> in ifcfg-<iface>, and
b) save the lease file as /var/lib/dhclient-<uuid>-<iface>.lease

This patch should make write-ifcfg handle both these things.
2012-03-08 10:58:42 +01:00
Will Woods d37ad6aea0 write-ifcfg.sh: cleanups
mkdir -p creates intermediate directories and never returns an error, so
we don't need to create the intermediate directories ourself.
2012-03-08 10:58:42 +01:00
Harald Hoyer a3f00efc99 40network/kill-dhclient.sh: kill dhclient silently 2012-03-08 10:58:16 +01:00
Will Woods 8a0d2fc56f url-lib: make nfs support optional
Only include /lib/nfs-lib.sh if it exists, and then only run
add_url_handler if nfs-lib was imported.
2012-03-02 11:11:56 +01:00
Will Woods ffcc64bdea move emergency_shell to dracut-lib.sh
This lets things running outside init call an emergency_shell.
(example: scripts called by initqueue)
2012-03-02 11:11:56 +01:00
Jan Stodola 778f767bcc Fix correct nfs path 2012-03-02 11:10:59 +01:00
Harald Hoyer 8d021e4b8a 90crypt/parse-crypt.sh: simplify rd.luks.uuid testing 2012-02-29 16:20:02 +01:00
Harald Hoyer 95268ffed3 30convertfs/convertfs.sh: correct check for /usr/bin 2012-02-29 13:30:30 +01:00
Harald Hoyer 9eded206c9 98usrmount/mount-usr.sh: check, if we have $NEWROOT/etc/fstab 2012-02-28 16:35:08 +01:00
Harald Hoyer b642ce5340 98usrmount/mount-usr.sh: ignore comments in fstab 2012-02-28 12:54:01 +01:00
Harald Hoyer b7ddf6c1d8 make bzip2 optional 2012-02-25 17:22:02 +01:00
Harald Hoyer cf38fc7389 10i18n/module-setup.sh: optimize install of all kbd files 2012-02-25 17:18:51 +01:00
Harald Hoyer ddd01008ff 95terminfo/module-setup.sh: no need to call "find" 2012-02-25 17:09:15 +01:00
Harald Hoyer b6f0dcbda1 30convertfs/convertfs.sh: use hardlinks for inter-/usr cp 2012-02-25 16:06:38 +01:00
Harald Hoyer 5e5f3d5e6c 95nfs/module-setup.sh: removed "egrep" and "ls" calls 2012-02-25 16:06:16 +01:00
Harald Hoyer 25b36ef124 99fs-lib/module-setup.sh: removed "touch" 2012-02-25 16:05:51 +01:00
Harald Hoyer 1701d7adc8 30convertfs/convertfs.sh: add check for /usr/bin
Check if /usr is mounted, by checking for /usr/bin
2012-02-24 14:59:18 +01:00
Harald Hoyer 004fd0557d host-only checks corrected and kernel_only mode
In kernel_only mode, we don't want to write /etc/cmdline.d

Correctly return the check functions, so we have a valid return of
for_each_host_dev_fs().

mdraid and dmraid functions had wrong checkings for the filesystem
type.
2012-02-22 19:29:57 +01:00
Colin Guthrie 0330b91987 lvm: Only activate a given vg+lv once.
Due to the way the main loop runs to detect partions, the same one
might be included twice (albeit via different symlinks.

This code simply prevents the same combo being activated twice.

A better fix might simply be to not include duplicate (after
resolving symlinks) entries in the host_fs_types variable.
2012-02-22 18:30:58 +01:00
Colin Guthrie e0a38de881 mount-usr: Calculate and pass full fsck options when mounting /usr.
Edited-By: Harald Hoyer <harald@redhat.com>
2012-02-22 18:11:27 +01:00
Colin Guthrie d06580986b fs-lib: No need to pass in _dev and _fop as they are inherited, not used as arguments. 2012-02-22 18:04:43 +01:00
Harald Hoyer 8b6e099892 90kernel-modules/module-setup.sh: exclude nfs* lockd from standard
do not install nfs* lockd filesystems for the standard kernel modules
2012-02-22 16:14:38 +01:00
Harald Hoyer edd3262efd 40network/parse-ip-opts.sh: "local" can only be used in functions 2012-02-22 16:13:20 +01:00
Harald Hoyer b6e244f794 90kernel-modules/module-setup.sh: install modules.* in installkernel()
modules.* should be in the kernel initramfs
2012-02-22 15:15:22 +01:00
Harald Hoyer 14669e3a86 95nfs/module-setup.sh: whitespace fixup 2012-02-22 15:15:22 +01:00
Harald Hoyer 552ecca6db Renamed all shell scripts to *.sh 2012-02-22 15:15:21 +01:00
Will Woods ed293f6d0c url-lib: fix fetch_url return value for dotfiles
If you do "fetch_url $url/.somefile", fetch_url would return failure,
because "$outdir/*" wouldn't match the file.

Use ls -A (which busybox ls supports) to actually find possible dotfiles
in the created output dir.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-21 10:11:11 +01:00
Harald Hoyer cd9592385d 98usrmount/mount-usr.sh: honor fs_passno in /etc/fstab
If the sixth field in /etc/fstab is "0" or not present for /usr, do not
run fsck.

This prevents fsck for nfs /usr also.
2012-02-20 17:28:58 +01:00
Harald Hoyer 2a3faa2df9 95iscsi: fix "root=iscsi:...." case
install udev rules and wait for /dev/root
2012-02-16 11:34:37 +01:00
Dave Young 86de902e35 ssh-client module install fix
commit 38164332e1 try to
disallow ssh-client install for without proper options.
But ssh-client will fail installation with --sshkey for
publickey mode

Fix it by refusing to install only when both --ctty and --sshkey
are not added in options.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-16 11:21:34 +01:00
Will Woods c1df00d2c6 livenet: avoid spurious error message / wait_for_dev
If the user didn't request a livenet boot, don't print an error
and don't do wait_for_dev.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-16 11:21:34 +01:00
Dave Young 75cade1216 add function wait_for_route_ok
Manually setuping nic through udev is not always done when
we want network access. Here add a function wait_for_route_ok to
wait and make sure the network is accesible

[v1 -> v2]:
Harald: don't use bash syntax
Add check for [ -n "$li" ] because `ip route show` will show nothing probably

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-16 11:19:07 +01:00
Harald Hoyer 969394f503 95nfs/nfs-lib.sh: do not bail out at sourcing in nfsroot_from_dhcp()
nfsroot_from_dhcp() returned with failure if one of
/tmp/net.$iface.override /tmp/dhclient.$iface.dhcpopts was missing
2012-02-15 16:39:41 +01:00
Harald Hoyer 4977febf46 s/bash/sh for all new *-lib.sh 2012-02-15 15:46:24 +01:00
Will Woods 285e81c9e2 add img-lib: a library for handling filesystem images
img-lib handles identifying and unpacking archives (uncompressed or
compressed) and filesystem images.

Currently tar and gzip are required; cpio and xz are optional, and bzip2
is supported but unused.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Will Woods d663f5aeb0 add set_http_header to url-lib
This allows you to set custom headers for curl to send with HTTP
requests.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Will Woods 370329ca3b url-lib: add support for NFS
This adds nfs_fetch_url to allow fetching arbitrary files from NFS.

This means that livenet can now run using an NFS-mounted live image,
which reduces memory usage by a lot.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Will Woods 5978983b30 90livenet: port to url-lib
This makes the livenetroot module use url-lib for fetching its root
image/filesystem. There's also some minor tweaks for POSIX compliance.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Will Woods 753c82d0e6 add module 45url-lib
url-lib adds some functions for dealing with URLs (mostly for fetching
files, for the moment).

It uses curl to handle http/https/ftp URLs, but it can be extended by other
modules at runtime by using the "add_url_handler" function.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Will Woods 9fcfa04ca9 port nfsroot to nfs-lib
Rewrite nfsroot to use nfs-lib. The functionality should be unchanged.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Will Woods 9c463909d6 95nfs: add nfs-lib.sh
nfs-lib.sh contains a bunch of functions used to parse NFS "url"s of
various types, pull nfs information out of dhcp info, and actually
perform nfs mounts sanely.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00