reformat source code

removed tabs and set indention to 4 spaces
added emacs and vi format headers
master
Harald Hoyer 2010-09-10 15:23:06 +02:00
parent d95d2f3b44
commit cc02093d69
173 changed files with 1835 additions and 1448 deletions

48
dracut
View File

@ -1,11 +1,13 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Generator script for a dracut initramfs
# Tries to retain some degree of compatibility with the command line
# of the various mkinitrd implementations out there
#

# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
# Copyright 2005-2010 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -24,7 +26,8 @@

usage() {
# 80x25 linebreak here ^
echo "Usage: $0 [OPTION]... <initramfs> <kernel-version>
cat << EOF
Usage: $0 [OPTION]... <initramfs> <kernel-version>
Creates initial ramdisk images for preloading modules

-f, --force Overwrite existing initramfs file.
@ -61,8 +64,8 @@ Creates initial ramdisk images for preloading modules
-v, --verbose Verbose output during the build process
-c, --conf [FILE] Specify configuration file to use.
Default: /etc/dracut.conf
--confdir [DIR] Specify configuration directory to use *.conf files from.
Default: /etc/dracut.conf.d
--confdir [DIR] Specify configuration directory to use *.conf files
from. Default: /etc/dracut.conf.d
-l, --local Local mode. Use modules from the current working
directory instead of the system-wide installed in
/usr/share/dracut/modules.d.
@ -86,7 +89,7 @@ Creates initial ramdisk images for preloading modules
otherwise you will not be able to boot.
--no-compress Do not compress the generated initramfs. This will
override any other compression options.
"
EOF
}

# Little helper function for reading args from the commandline.
@ -163,7 +166,8 @@ export PATH

[[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut

[[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions" ]] && dracutbasedir="${0%/*}"
[[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions" ]] && \
dracutbasedir="${0%/*}"

# if we were not passed a config file, try the default one
if [[ ! -f $conffile ]]; then
@ -215,7 +219,8 @@ fw_dir=${fw_dir//:/ }
if [[ -f $dracutbasedir/dracut-functions ]]; then
. $dracutbasedir/dracut-functions
else
echo "Cannot find $dracutbasedir/dracut-functions. Are you running from a git checkout?"
echo "Cannot find $dracutbasedir/dracut-functions."
echo "Are you running from a git checkout?"
echo "Try passing -l as an argument to $0"
exit 1
fi
@ -270,13 +275,16 @@ elif [[ -f "$outfile" && ! -w "$outfile" ]]; then
exit 1
fi

hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency"
hookdirs="cmdline pre-udev pre-trigger netroot pre-mount"
hookdirs+=" pre-pivot mount emergency"

[[ $TMPDIR && ! -w $TMPDIR ]] && unset TMPDIR
readonly initdir=$(mktemp -d -t initramfs.XXXXXX)

trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT # clean up after ourselves no matter how we die.
trap 'exit 1;' SIGINT # clean up after ourselves no matter how we die.
# clean up after ourselves no matter how we die.
trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT
# clean up after ourselves no matter how we die.
trap 'exit 1;' SIGINT

# Need to be able to have non-root users read stuff (rpcbind etc)
chmod 755 "$initdir"
@ -288,7 +296,8 @@ export initdir hookdirs dracutbasedir dracutmodules drivers \

if [[ $kernel_only != yes ]]; then
# Create some directory structure first
for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot tmp dev/pts var/run; do
for d in bin sbin usr/bin usr/sbin usr/lib etc \
proc sys sysroot tmp dev/pts var/run; do
inst_dir "/$d";
done
fi
@ -336,7 +345,8 @@ unset item

# make sure that library links are correct and up to date
cp -ar /etc/ld.so.conf* "$initdir"/etc
ldconfig -r "$initdir" || [[ $UID != "0" ]] && dinfo "ldconfig might need uid=0 (root) for chroot()"
ldconfig -r "$initdir" || [[ $UID != "0" ]] && \
dinfo "ldconfig might need uid=0 (root) for chroot()"

[[ $beverbose = yes ]] && (du -c "$initdir" | sort -n)

@ -351,19 +361,11 @@ if [[ $do_strip = yes ]] ; then
fi

if [[ $do_strip = yes ]] ; then
for f in $(find "$initdir" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 -or -path '*/lib/modules/*.ko' \) ); do
for f in $(find "$initdir" -type f \
\( -perm -0100 -or -perm -0010 -or -perm -0001 \
-or -path '*/lib/modules/*.ko' \) ); do
dinfo "Stripping $f"
strip -g "$f" 2>/dev/null|| :
#
# FIXME: only strip -g for now
#
#strip -g --strip-unneeded "$f" || :
#note="-R .note"
#if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
# grep -q ALLOC; then
# note=
#fi
#strip -R .comment $note "$f" || :
done
fi


View File

@ -1,5 +1,7 @@
#!/bin/bash --norc

# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Copyright 2009 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
@ -31,7 +33,8 @@ derror() {

usage() {
# 80x25 linebreak here ^
echo "Usage: $0 [OPTION]... <initramfs> <base image> [<image>...]
cat << EOF
Usage: $0 [OPTION]... <initramfs> <base image> [<image>...]
Creates initial ramdisk image by concatenating several images from the command
line and /boot/dracut/

@ -45,7 +48,7 @@ line and /boot/dracut/
-h, --help This message
--debug Output debug information of the build process
-v, --verbose Verbose output during the build process
"
EOF
}



View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# functions used by dracut and other tools.
#
@ -651,7 +653,8 @@ instmods() {
while (($# > 0)); do
mod=${1%.ko*}
case $mod in
=*) # This introduces 2 incompatible meanings for =* arguments
=*)
# This introduces 2 incompatible meanings for =* arguments
# to instmods. We need to decide which one to keep.
if [[ $mod = =ata && -f $srcmods/modules.block ]] ; then
instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules.block")
@ -661,7 +664,8 @@ instmods() {
instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*")
fi
;;
--*) mod=${mod##*/}
--*)
mod=${mod##*/}
mpargs+=" $mod";;
i2o_scsi) shift; continue;; # Do not load this diagnostic-only module
*) mod=${mod##*/}
@ -690,5 +694,3 @@ instmods() {
shift
done
}

# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/bash --norc
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
#
@ -43,13 +45,13 @@ function get_verbose() {


function get_numeric_dev() {
(
(
fmt="%d:%d"
if [ "$1" == "hex" ]; then
fmt="%x:%x"
fi
ls -lH "$2" | awk '{ sub(/,/, "", $5); printf("'"$fmt"'", $5, $6); }'
) 2>/dev/null
) 2>/dev/null
}


@ -597,33 +599,33 @@ while [ $# -gt 0 ]; do
shift
done

[ -z "$rootfs" ] && rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' $fstab)
[ -z "$rootopts" ] && rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' $fstab)
[ -z "$rootopts" ] && rootopts="defaults"
[ -z "$rootfs" ] && rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' $fstab)
[ -z "$rootopts" ] && rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' $fstab)
[ -z "$rootopts" ] && rootopts="defaults"


[ -z "$rootdev" ] && rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' $fstab)
[ -z "$rootdev" ] && rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' $fstab)
# check if it's nfsroot
physdev=""
if [ "$rootfs" == "nfs" ]; then
physdev=""
if [ "$rootfs" == "nfs" ]; then
if [ "x$net_list" == "x" ]; then
handlenfs $rootdev
fi
else
else
# check if it's root by label
rdev=$rootdev
rdev=$(resolve_device_name "$rdev")
rootopts=$(echo $rootopts | sed -e 's/^r[ow],//' -e 's/,_netdev//' -e 's/_netdev//' -e 's/,r[ow],$//' -e 's/,r[ow],/,/' -e 's/^r[ow]$/defaults/' -e 's/$/,ro/')
findstoragedriver "$rdev"
fi
fi

# find the first swap dev which would get used for swsusp
[ -z "$thawdev" ] && thawdev=$(awk '/^[ \t]*[^#]/ { if ($3 == "swap") { print $1; exit }}' $fstab)
swsuspdev="$thawdev"
if [ -n "$swsuspdev" ]; then
[ -z "$thawdev" ] && thawdev=$(awk '/^[ \t]*[^#]/ { if ($3 == "swap") { print $1; exit }}' $fstab)
swsuspdev="$thawdev"
if [ -n "$swsuspdev" ]; then
swsuspdev=$(resolve_device_name "$swsuspdev")
findstoragedriver "$swsuspdev"
fi
fi


cemit()
@ -712,4 +714,3 @@ if [ -n "$rootdev" ]; then
fi

echo
# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/sh
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

STATEDIR=/var/lib/dracut
BOOTDIR=/boot

View File

@ -1,4 +1,23 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Copyright 2005-2010 Harald Hoyer <harald@redhat.com>
# Copyright 2005-2010 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

[[ $# -eq 1 ]] || { echo "Usage: $(basename $0) <initramfs file>" ; exit 1 ; }
[[ -f $1 ]] || { echo "$1 does not exist" ; exit 1 ; }

View File

@ -98,5 +98,3 @@ if [[ $basicmodules ]]; then
else
dracut $dracut_args "$target" "$kernel"
fi

# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[ -x /sbin/bootchartd ] || exit 1

# do not enable bootchartd by default

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

inst /sbin/bootchartd
inst /bin/bash

View File

@ -1,2 +1,4 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[ -x /bin/dash ]

View File

@ -1,4 +1,7 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# If another shell is already installed, do not use dash
[[ -x $initdir/bin/sh ]] && return


View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

[[ $1 = -d ]] && exit 0
exit 255

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
do_fips()
{
FIPSMODULES=$(cat /etc/fipsmodules)
@ -66,5 +68,3 @@ else
do_fips || die "FIPS integrity test failed"
set +e
fi

# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

inst_hook pre-trigger 01 "$moddir/fips.sh"
dracut_install sha512hmac rmmod insmod mount uname umount
@ -11,5 +13,3 @@ for dir in "$usrlibdir" "$libdir"; do
done

dracut_install $usrlibdir/hmaccalc/sha512hmac.hmac

# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

FIPSMODULES="aead aes_generic aes-x86_64 ansi_cprng cbc ccm chainiv ctr"
FIPSMODULES="$FIPSMODULES des deflate ecb eseqiv hmac seqiv sha256 sha512"
@ -12,5 +14,3 @@ for mod in $FIPSMODULES; do
echo "blacklist $mod" >> "${initdir}/etc/modprobe.d/fips.conf"
fi
done

# vim:ts=8:sw=4:sts=4:et

View File

@ -1,3 +1,5 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

exit 0

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

[ -e /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
[ -e /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
DEFAULT_SYSFONT=LatArCyrHeb-16

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

inst_key_val() {
local value

View File

@ -1,3 +1,5 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[ -f /etc/redhat-release ]


View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if [ -e "$moddir/dracut-version" ]; then
dracut_rpm_version=$(cat "$moddir/dracut-version")

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
for i in dracut-*; do
if [ -f $i ]; then
vinfo < $i

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if [[ $1 = -d ]]; then
[ -d /etc/sysconfig/network-scripts/ ] && echo ifcfg

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

setup_interface() {
ip=$new_ip_address

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# Don't continue if root is ok
[ -n "$rootok" ] && return

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# if there are no ifname parameters, just use NAME=KERNEL
if ! getarg ifname= >/dev/null ; then

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# We don't need to check for ip= errors here, that is handled by the
# cmdline parser script

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
dracut_install ip dhclient brctl arping
inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/netroot" "/sbin/netroot"

View File

@ -1,4 +1,7 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# Include wired net drivers, excluding wireless

net_module_test() {

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

for f in /tmp/dhclient.*.pid; do
[ -e $f ] || continue

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# pxelinux provides macaddr '-' separated, but we need ':'
fix_bootif() {

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

PATH=$PATH:/sbin:/usr/sbin


View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Format:
# bridge=<bridgename>:<ethname>

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Format:
# ifname=<interface>:<mac>

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Format:
# ip=[dhcp|on|any]

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# ifcfg is required by network
#[[ $1 = -d ]] && echo network

View File

@ -1,2 +1,4 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
inst_hook pre-pivot 85 "$moddir/write-ifcfg.sh"

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# NFS root might have reached here before /tmp/net.ifaces was written
udevadm settle --timeout=30

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# TODO: splash_geninitramfs
# TODO: /usr/share/splashutils/initrd.splash

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

CDROOT=0
. /lib/gensplash-lib.sh

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

CDROOT=0
. /lib/gensplash-lib.sh

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if ! getarg rd_NO_SPLASH; then
[ -c /dev/null ] || mknod /dev/null c 1 3

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

call_splash_geninitramfs() {
local out ret

View File

@ -1,3 +1,5 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 = -d ]] && type -P cryptsetup >/dev/null && echo crypt
[[ -x /sbin/plymouthd && -x /bin/plymouth && -x /usr/sbin/plymouth-set-default-theme ]]

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \
|| ! grep -q PLYMOUTH_POPULATE_SOURCE_FUNCTIONS /usr/libexec/plymouth/plymouth-populate-initrd \

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# Include KMS capable drm drivers
for modname in $(find "$srcmods/kernel/drivers/gpu/drm" -name '*.ko' 2>/dev/null); do
grep -q drm_crtc_init $modname && instmods $modname

View File

@ -1 +1,3 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[ -x /bin/plymouth ] && /bin/plymouth --hide-splash

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if [ -x /bin/plymouth ]; then
/bin/plymouth --newroot=$NEWROOT

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png"
PLYMOUTH_THEME=$(plymouth-set-default-theme)

@ -45,5 +47,3 @@ else
ln -s text/text.plymouth default.plymouth 2>&1;
)
fi

# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if ! getarg rd_NO_PLYMOUTH; then
[ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
@ -19,6 +21,3 @@ if ! getarg rd_NO_PLYMOUTH; then
/lib/udev/console_init tty0
/bin/plymouth --show-splash 2>&1 | vinfo
fi


# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# No Xen-detect? Boo!!
if ! hash xen-detect 2>/dev/null; then

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
hash xen-detect 2>/dev/null || \
hash -p /usr/lib/xen-default/bin/xen-detect xen-detect
inst "$(hash -t xen-detect)" /sbin/xen-detect

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

for i in \
xenbus_probe_frontend xen-pcifront \

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
xen-detect
RC=$?
if [ "$RC" = "1" ] ; then

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# We depend on udev-rules being loaded
[[ "$1" = "-d" ]] && exit 0

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

inst_rules "$moddir/40-btrfs.rules"
dracut_install btrfsctl

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# if cryptsetup is not installed, then we cannot support encrypted devices.
type -P cryptsetup >/dev/null || exit 1

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# close everything which is not busy
rm -f /etc/udev/rules.d/70-luks.rules >/dev/null 2>&1


View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# do not ask, if we already have root
[ -f /sysroot/proc ] && exit 0
@ -155,4 +157,3 @@ unset device luksname
udevsettle

exit 0
# vim:ts=8:sw=4:sts=4:et

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
inst cryptsetup
inst "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
inst_hook cmdline 30 "$moddir/parse-crypt.sh"

View File

@ -1,3 +1,5 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
instmods dm_crypt cbc sha256 xts aes aes_generic aesni-intel aes-x86_64 fpu


View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
if getarg rd_NO_LUKS; then
info "rd_NO_LUKS: removing cryptoluks activation"
rm -f /etc/udev/rules.d/70-luks.rules

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

exit 255


View File

@ -1 +1,3 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
strstr "$(cat /proc/misc)" device-mapper || modprobe dm_mod

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

modinfo -k $kernel dm_mod >/dev/null 2>&1 && \
inst_hook pre-udev 30 "$moddir/dm-pre-udev.sh"

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

instmods =drivers/md


View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# We depend on dm_mod being loaded
[ "$1" = "-d" ] && echo dm

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

. /lib/dracut-lib.sh


View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
dracut_install dmraid partx kpartx

inst dmeventd

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# nodmraid for anaconda / rc.sysinit compatibility
if getarg rd_NO_DM || getarg nodmraid; then
info "rd_NO_DM: removing DM RAID activation"

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# if dmsetup is not installed, then we cannot support fedora/red hat
# style live images

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
if [ "${root%%:*}" = "live" ]; then
{
printf 'KERNEL=="%s", SYMLINK+="live"\n' \

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

. /lib/dracut-lib.sh
[ -f /tmp/root.info ] && . /tmp/root.info

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
if [ "${root%%:*}" = "liveiso" ]; then
{
printf 'KERNEL=="loop0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root `/sbin/losetup -f --show %s`"\n' \

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
dracut_install umount
inst dmsetup
inst blkid

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# live images are specified with
# root=live:backingdev

@ -16,17 +18,17 @@ fi
[ "${liveroot%%:*}" = "live" ] || return

case "$liveroot" in
live:LABEL=*|LABEL=*)
live:LABEL=*|LABEL=*) \
root="${root#live:}"
root="$(echo $root | sed 's,/,\\x2f,g')"
root="live:/dev/disk/by-label/${root#LABEL=}"
rootok=1 ;;
live:CDLABEL=*|CDLABEL=*)
live:CDLABEL=*|CDLABEL=*) \
root="${root#live:}"
root="$(echo $root | sed 's,/,\\x2f,g')"
root="live:/dev/disk/by-label/${root#CDLABEL=}"
rootok=1 ;;
live:UUID=*|UUID=*)
live:UUID=*|UUID=*) \
root="${root#live:}"
root="live:/dev/disk/by-uuid/${root#UUID=}"
rootok=1 ;;

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf')
inst_hook cmdline 01 "$moddir/parse-kernel.sh"

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
if [[ -z $drivers ]]; then
block_module_test() {
local blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device'

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

for p in $(getargs rdloaddriver=); do
modprobe $p

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# We depend on dm_mod being loaded
[ "$1" = "-d" ] && echo dm

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
inst lvm

inst_rules "$moddir/64-lvm.rules"

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# run lvm scan if udev has settled

@ -57,21 +59,21 @@ nopoll=$(
check_lvm_ver $maj $min $sub && \
echo " --poll n ") 2>/dev/null )

if [ -n "$LVS" ] ; then
if [ -n "$LVS" ] ; then
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
lvm lvscan --ignorelockingfailure 2>&1 | vinfo
lvm lvchange -ay --ignorelockingfailure $nopoll --ignoremonitoring $LVS 2>&1 | vinfo
fi
fi

if [ -z "$LVS" -o -n "$VGS" ]; then
if [ -z "$LVS" -o -n "$VGS" ]; then
info "Scanning devices $lvmdevs for LVM volume groups $VGS"
lvm vgscan --ignorelockingfailure 2>&1 | vinfo
lvm vgchange -ay --ignorelockingfailure $nopoll --ignoremonitoring $VGS 2>&1 | vinfo
fi
fi

if [ "$lvmwritten" ]; then
if [ "$lvmwritten" ]; then
rm -f /etc/lvm/lvm.conf
ln -s /sbin/lvm-cleanup /pre-pivot/30-lvm-cleanup.sh 2>/dev/null
ln -s /sbin/lvm-cleanup /pre-pivot/31-lvm-cleanup.sh 2>/dev/null
fi
unset lvmwritten
fi
unset lvmwritten

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
if [ -e /etc/lvm/lvm.conf ] && getarg rd_NO_LVMCONF; then
rm -f /etc/lvm/lvm.conf
fi

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# No mdadm? No mdraid support.
type -P mdadm >/dev/null || exit 1

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

dracut_install mdadm partx


View File

@ -1,3 +1,5 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
instmods =drivers/md


View File

@ -1,2 +1,4 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
info "rd_NO_MDIMSM: no MD RAID for imsm/isw raids"
udevproperty rd_NO_MDIMSM=1

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
for f in /initqueue-settled/mdcontainer_start* /initqueue-settled/mdraid_start* /initqueue-settled/mdadm_auto*; do
[ -e $f ] && return 1
done

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
. /lib/dracut-lib.sh

info "Autoassembling MD Raid"

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
. /lib/dracut-lib.sh

md=$1

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# save state dir for mdmon/mdadm for the real root
mkdir /dev/.mdadm
[ -e /var/run/mdadm ] && rm -fr /var/run/mdadm

View File

@ -1,4 +1,7 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# stop everything which is not busy
for i in /dev/md* /dev/md/*; do
[ -b $i ] || continue

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

. /lib/dracut-lib.sh
# run mdadm if udev has settled

View File

@ -1,3 +1,5 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
if getarg rd_NO_MD; then
info "rd_NO_MD: removing MD RAID activation"
udevproperty rd_NO_MD=1

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# if there's no multipath binary, no go.
type -P multipath >/dev/null || exit 1

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

for f in \
/sbin/dmsetup \

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

mp_mod_test() {
local mpfuncs='scsi_register_device_handler|dm_dirty_log_type_register|dm_register_path_selector|dm_register_target'

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if [ -e /etc/multipath.conf ]; then
HARD=""

View File

@ -1,4 +1,6 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if [ -e /etc/multipath.conf -a -e /etc/multipath/wwids ]; then
modprobe dm-multipath

View File

@ -1,4 +1,6 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
arch=$(uname -m)
[ "$arch" = "s390" -o "$arch" = "s390x" ] || exit 1


Some files were not shown because too many files have changed in this diff Show More