Commit Graph

1290 Commits (cc227886c615fb059d37b8b91751a1c4571deab0)

Author SHA1 Message Date
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
Will Woods 9d169a07ce 40network: add net-lib.sh
net-lib.sh is a library of useful functions for network stuff.

More things may get added/moved here in the future.

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-02-15 15:46:24 +01:00
Harald Hoyer dee929cded 99base/init: removed redirection of mount errors to /dev/null 2012-02-15 15:46:24 +01:00
Harald Hoyer e0e2fb26c9 90kernel-modules: removed hard-removal of "ocfs2"
put omit_driver+=" ocfs2 " in the distribution configuration file
2012-02-15 15:46:23 +01:00
Harald Hoyer 11c0e7d44e 99base/init: reload udev rules after "pre-trigger" hook 2012-02-15 11:32:21 +01:00
Harald Hoyer dfb08e9f1c removed now useless cleanup hooks
in Fedora 17, we unpack /boot/initramfs-$(uname -r).img
on shutdown for a pivot root to disassemble the root device
2012-02-15 10:08:59 +01:00
Harald Hoyer e539fa9980 90mdraid: add "--offroot" support 2012-02-13 21:16:31 +01:00
Harald Hoyer e76921a58e 95terminfo/module-setup.sh: check for terminfo/l/linux
on Fedora 17 the old check found /etc/terminfo, but this directory is
emtpy.
2012-02-13 21:15:51 +01:00
Harald Hoyer 56a4cffd30 98integrity/module-setup.sh: depend on selinux dracut module 2012-02-13 18:17:40 +01:00
Harald Hoyer 682a2a9d1a 90kernel-modules/module-setup.sh: add "ata_piix" to hardcoded modules 2012-02-13 18:16:48 +01:00
Harald Hoyer fb67e4aa36 shutdown on demand
Do not save and restore the initramfs, but instead, just unpack the
default initramfs for shutdown on shutdown.
2012-02-13 07:08:08 +01:00
Harald Hoyer 81dcf7c90a 99shutdown/shutdown: don't do console_init on shutdown emergency 2012-02-09 14:16:31 +01:00
Harald Hoyer 075de7be45 98usrmount/mount-usr.sh: remove extra slash
otherwise we have /sysroot//usr in fstab
2012-02-09 13:58:49 +01:00
Harald Hoyer ce18bc4e97 30convertfs/convertfs.sh: call setfiles w/o path & check for existence 2012-02-07 20:57:12 +01:00
Harald Hoyer 567cc5d814 40network/net-genrules.sh: increase udev timeout 2012-02-07 20:52:14 +01:00
Harald Hoyer 56ac6c7e76 move all file removal cleanups to "cleanup" hook 2012-02-07 19:44:03 +01:00
Harald Hoyer 59feafc6c7 use "openvt" for emergency shell 2012-02-07 19:44:03 +01:00
Harald Hoyer de247618e7 init/shutdown: use "command -v" instead of "type" 2012-02-07 19:28:59 +01:00
Harald Hoyer 204db8a134 90btrfs/btrfs_finished.sh: put check in a function 2012-02-07 18:48:04 +01:00
Harald Hoyer 96b8d60a9b dracut: precreate "${initdir}/etc/cmdline.d" 2012-02-07 18:48:04 +01:00
Harald Hoyer 4951a1199d 99base/init: predefine path to init
if you add realinitpath="<path1> <path2>" to dracut.conf, then it will
be written to $initdir/etc/cmdline.d/distroinit.conf with
"rd.distroinit=<path1> rd.distroinit=<path2>" and evaluated by
99base/init, when it searches for init.
2012-02-07 18:48:03 +01:00
Harald Hoyer 4b691cccbe 95ssh-client/module-setup.sh: add executable bit 2012-02-07 12:18:52 +01:00
Dave Young 935b37ee8b auto setup network without netroot
Current dracut network only will be setup when netroot is used. But there are
some cases we need network even without netroot. For example kdump will need
copy vmcore to remote machine via scp or nfs mount. OTOH, if we use dracut as
a recovery system the network is helpful even root is not a network device.

This implementation is based on the manually bring up method. Here add a kernel
cmdline argument rd.neednet. If rd.neednet is set dracut will bring up network
with ifup $INTERFACE -m. If netroot is used we still keep original behavior.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:22 +01:00
Dave Young fe266c6c69 do not check dev node exist for fstab-sys mounting
in case nfs mounting do not check if $_dev exist

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:22 +01:00
Dave Young c6655c4115 split nfs rpc daemons startup script
fstab-sys will mount nonroot nfs as well, so we need to split the necessary
code from nfsroot to start rpc daemon as hook script.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:21 +01:00
Dave Young 65bb31a405 source dracut-lib.sh in nfs cleanup script
nfsroot-cleanup.sh need source dracut-lib.sh for function incol2

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:21 +01:00
Dave Young cc78087b83 add nobody group for rpc.idmapd
Add nobody group due to rpc.idmapd will fail to startup without nobody group

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:21 +01:00
Dave Young 0fc2080294 fix fstab-sys module check
If /etc/fstab.sys does not exist installing fstab-sys module will fail.
Fix this by checking use_fstab and fstab_lines as well

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:21 +01:00
Dave Young 957bc5c92f allow ifup bring up network manually even without netroot
For kdump we need scp vmcore to remote machine, the nic to be used is
not limited to netroot one. we need a feature for manually bringing up
 network interface. Also it is useful for emergency shell with
ssh-client for recovery or test purpose

I implement this by adding one argument to ifup script, user can use
`/sbin/ifup eth0 -m` to bring up eth0, note ifup will regard it a
manual operation for the nic specified in 1st argument if there's
the 2nd argument.

If same nic is used for netroot the 2nd argument will be ignored,
in this case we will leave netroot bring up it automatically to
avoid side effect. And in this case hooks such as kdump will need to
execute after netroot mounted.

`ifup eth0 -m` will create /tmp/net.eth0.manualup stamp file,
later dhclient-script can check this and pass $2 to netroot,
then netroot script will bring eth0 up

Thanks for comments and suggestions from David Dillow.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-07 12:14:21 +01:00
Cong Wang 418febfc44 btrfs: fix two bugs in module-setup.sh
First, $host_fs_types is an array.
Second, use strstr to match btrfs type.

Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
2012-02-07 12:14:21 +01:00
Harald Hoyer 6aafdc5c04 90crypt/crypt-cleanup.sh: send unneeded output to /dev/null 2012-02-07 11:23:42 +01:00
Harald Hoyer a178ca6b5c more cleanup in pre-pivot 2012-02-07 10:32:35 +01:00
Harald Hoyer 9d5e3ed740 30convertfs/convertfs.sh: move /var/run and /var/lock fix to the start
Even, if the system is already converted, we want to fix /var/run and
/var/lock.
2012-02-07 10:24:10 +01:00