Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
829c258554 | ||
![]() |
5dcd565dab | ||
![]() |
7838d85351 | ||
![]() |
db59288d79 | ||
![]() |
82794b4b90 | ||
![]() |
b4fbdbbe1e | ||
![]() |
9853774351 | ||
![]() |
79471f365e | ||
![]() |
98b108284c | ||
![]() |
8ee30d09a4 | ||
![]() |
01583ae4ad | ||
![]() |
249f8b5bfc | ||
![]() |
561d7f4d7c | ||
![]() |
4ad453445a | ||
![]() |
e620bb01da | ||
![]() |
7931bf0420 | ||
![]() |
c174aea07d | ||
![]() |
85323dcbb9 | ||
![]() |
8bc650d9dc | ||
![]() |
ea216a650e | ||
![]() |
a16ebfd56a | ||
![]() |
2aad23443e | ||
![]() |
8a5354a9a5 | ||
![]() |
dbf381f7fb | ||
![]() |
1080ce600a | ||
![]() |
0dd37f13c5 |
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
VERSION=009
|
||||
VERSION=010
|
||||
GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
|
||||
|
||||
prefix ?= /usr
|
||||
@@ -72,11 +72,14 @@ clean:
|
||||
|
||||
archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2
|
||||
|
||||
dist: dracut-$(VERSION).tar.bz2
|
||||
dist: dracut-$(VERSION).tar.gz
|
||||
|
||||
dracut-$(VERSION).tar.bz2:
|
||||
git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ |bzip2 > dracut-$(VERSION).tar.bz2
|
||||
|
||||
dracut-$(VERSION).tar.gz:
|
||||
git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ |gzip > dracut-$(VERSION).tar.gz
|
||||
|
||||
dracut-$(VERSION)-$(GITVERSION).tar.bz2:
|
||||
git archive --format=tar HEAD --prefix=dracut-$(VERSION)-$(GITVERSION)/ |bzip2 > dracut-$(VERSION)-$(GITVERSION).tar.bz2
|
||||
|
||||
|
6
NEWS
6
NEWS
@@ -1,3 +1,9 @@
|
||||
dracut-010
|
||||
==========
|
||||
- lots of bugfixes
|
||||
- plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth
|
||||
- add "/lib/firmware/updates" to default firmware path
|
||||
|
||||
dracut-009
|
||||
==========
|
||||
- dracut generator
|
||||
|
4
PKGBUILD
4
PKGBUILD
@@ -3,7 +3,7 @@ pkgver=$(date +%s)
|
||||
pkgrel=$(git log --pretty=format:%h |head -n 1)
|
||||
pkgdesc="Initramfs generation utility"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://sourceforge.net/apps/trac/dracut/"
|
||||
url="https://dracut.wiki.kernel.org/"
|
||||
license=('GPL')
|
||||
conflicts=('dracut' 'mkinitcpio')
|
||||
provides=('dracut=9999' 'mkinitcpio=9999')
|
||||
@@ -18,4 +18,4 @@ build() {
|
||||
cd ..
|
||||
make sysconfdir=/etc || return 1
|
||||
make DESTDIR="${pkgdir}" sysconfdir=/etc install || return 1
|
||||
}
|
||||
}
|
||||
|
4
debian/control
vendored
4
debian/control
vendored
@@ -4,8 +4,8 @@ Priority: optional
|
||||
Maintainer: Philippe Seewer <philippe.seewer@bfh.ch>
|
||||
Build-Depends: debhelper (>= 5.0), cdbs
|
||||
Standards-Version: 3.8.4
|
||||
Vcs-Browser: http://dracut.git.sourceforge.net/git/gitweb-index.cgi
|
||||
Vcs-Git: git://dracut.git.sourceforge.net/gitroot/dracut/dracut
|
||||
Vcs-Browser: http://git.kernel.org/?p=boot/dracut/dracut.git
|
||||
Vcs-Git: git://git.kernel.org/pub/scm/boot/dracut/dracut.git
|
||||
|
||||
Package: dracut
|
||||
Architecture: all
|
||||
|
2
debian/copyright
vendored
2
debian/copyright
vendored
@@ -3,7 +3,7 @@ Fri Nov 20 15:45:00 +0100
|
||||
|
||||
Sources can be downloaded from:
|
||||
|
||||
https://sourceforge.net/projects/dracut/
|
||||
http://www.kernel.org/pub/linux/utils/boot/dracut/
|
||||
|
||||
Upstream Maintainer:
|
||||
Harald Hoyer <harald@redhat.com>
|
||||
|
15
dracut
15
dracut
@@ -187,7 +187,6 @@ push_arg() {
|
||||
fi
|
||||
}
|
||||
|
||||
kernel="unset"
|
||||
verbosity_mod_l=0
|
||||
|
||||
while (($# > 0)); do
|
||||
@@ -223,7 +222,9 @@ while (($# > 0)); do
|
||||
-H|--hostonly) hostonly_l="yes" ;;
|
||||
--fstab) use_fstab_l="yes" ;;
|
||||
-h|--help) usage; exit 1 ;;
|
||||
-i|--include) push include_src "$2"; push include_target "$3"; shift 2;;
|
||||
-i|--include) push include_src "$2"
|
||||
push include_target "$3"
|
||||
shift 2;;
|
||||
--bzip2) compress_l="bzip2";;
|
||||
--lzma) compress_l="lzma";;
|
||||
--xz) compress_l="xz";;
|
||||
@@ -237,9 +238,9 @@ while (($# > 0)); do
|
||||
;;
|
||||
-*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
|
||||
*)
|
||||
if ! [[ $outfile ]]; then
|
||||
if ! [[ ${outfile+x} ]]; then
|
||||
outfile=$1
|
||||
elif [[ $kernel = "unset" ]]; then
|
||||
elif ! [[ ${kernel+x} ]]; then
|
||||
kernel=$1
|
||||
else
|
||||
usage; exit 1;
|
||||
@@ -248,7 +249,7 @@ while (($# > 0)); do
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if ! [[ $kernel ]] || [[ $kernel = "unset" ]]; then
|
||||
if ! [[ $kernel ]]; then
|
||||
kernel=$(uname -r)
|
||||
fi
|
||||
[[ $outfile ]] || outfile="/boot/initramfs-$kernel.img"
|
||||
@@ -349,7 +350,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||||
[[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
|
||||
[[ $lvmconf_l ]] && lvmconf=$lvmconf_l
|
||||
[[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut
|
||||
[[ $fw_dir ]] || fw_dir=/lib/firmware
|
||||
[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware"
|
||||
[[ $do_strip ]] || do_strip=no
|
||||
[[ $compress_l ]] && compress=$compress_l
|
||||
[[ $show_modules_l ]] && show_modules=$show_modules_l
|
||||
@@ -492,7 +493,7 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
|
||||
fi
|
||||
done
|
||||
unset moddir
|
||||
dinfo "*** Including modules' done ***"
|
||||
dinfo "*** Including modules done ***"
|
||||
|
||||
## final stuff that has to happen
|
||||
|
||||
|
@@ -787,7 +787,7 @@ instmods() {
|
||||
# it may require
|
||||
for_each_kmod_dep install_kmod_with_fw $mod \
|
||||
--set-version $kernel ${moddirname}
|
||||
ret=$((ret+$?))
|
||||
((ret+=$?))
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
|
@@ -134,7 +134,7 @@ This parameter can be specified multiple times.</para>
|
||||
<envar>rd.debug</envar>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>set -x for the dracut shell and logs to dmesg, console and <filename>/init.log</filename></para>
|
||||
<para>set -x for the dracut shell and logs to dmesg, console and <filename>/run/initramfs/init.log</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
11
dracut.spec
11
dracut.spec
@@ -14,7 +14,7 @@
|
||||
%endif
|
||||
|
||||
Name: dracut
|
||||
Version: 009
|
||||
Version: 010
|
||||
%define release_prefix 0%{?rdist}
|
||||
Release: %{release_prefix}
|
||||
|
||||
@@ -26,10 +26,11 @@ Group: System Environment/Base
|
||||
Group: System/Base
|
||||
%endif
|
||||
License: GPLv2+
|
||||
URL: http://apps.sourceforge.net/trac/dracut/wiki
|
||||
URL: https://dracut.wiki.kernel.org/
|
||||
# Source can be generated by
|
||||
# http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=snapshot;h=%{?dashgittag};sf=tgz
|
||||
Source0: dracut-%{version}%{?dashgittag}.tar.bz2
|
||||
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{?dashgittag};sf=tgz
|
||||
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}%{?dashgittag}.tar.bz2
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%if 0%{?fedora}
|
||||
@@ -105,7 +106,7 @@ Requires: rpcbind
|
||||
%if %{with_nbd}
|
||||
Requires: nbd
|
||||
%endif
|
||||
Requires: net-tools iproute
|
||||
Requires: iproute
|
||||
Requires: bridge-utils
|
||||
|
||||
%if 0%{?fedora}
|
||||
|
@@ -307,7 +307,7 @@ rd.live.overlay/
|
||||
<listitem>
|
||||
<para>With dracut >= 002-11, you can inspect the rd.debug output with:
|
||||
</para>
|
||||
<screen># less /init.log
|
||||
<screen># less /run/initramfs/init.log
|
||||
# dmesg | less</screen>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
15
lsinitrd
15
lsinitrd
@@ -19,11 +19,12 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
[[ $# -eq 1 || $# -eq 2 ]] || { echo "Usage: $(basename $0) <initramfs file> [<filename>]" ; exit 1 ; }
|
||||
[[ -f $1 ]] || { echo "$1 does not exist" ; exit 1 ; }
|
||||
[[ $# -le 2 ]] || { echo "Usage: $(basename $0) [<initramfs file> [<filename>]]" ; exit 1 ; }
|
||||
image="${1:-/boot/initramfs-$(uname -r).img}"
|
||||
[[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; }
|
||||
|
||||
CAT=zcat
|
||||
FILE_T=$(file $1)
|
||||
FILE_T=$(file "$image")
|
||||
|
||||
if [[ "$FILE_T" =~ ": gzip compressed data" ]]; then
|
||||
CAT=zcat
|
||||
@@ -34,13 +35,13 @@ elif [[ "$FILE_T" =~ ": data" ]]; then
|
||||
fi
|
||||
|
||||
if [[ $# -eq 2 ]]; then
|
||||
$CAT $1 | cpio --extract --verbose --quiet --to-stdout ${2#/} 2>/dev/null
|
||||
$CAT $image | cpio --extract --verbose --quiet --to-stdout ${2#/} 2>/dev/null
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo "$1:"
|
||||
echo "$image:"
|
||||
echo "========================================================================"
|
||||
$CAT $1 | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null
|
||||
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null
|
||||
echo "========================================================================"
|
||||
$CAT $1 | cpio --extract --verbose --quiet --list
|
||||
$CAT "$image" | cpio --extract --verbose --quiet --list
|
||||
echo "========================================================================"
|
||||
|
@@ -4,20 +4,18 @@
|
||||
do_fips()
|
||||
{
|
||||
FIPSMODULES=$(cat /etc/fipsmodules)
|
||||
BOOT=$(getarg boot=)
|
||||
boot=$(getarg boot=)
|
||||
KERNEL=$(uname -r)
|
||||
case "$boot" in
|
||||
block:LABEL=*|LABEL=*)
|
||||
boot="${boot#block:}"
|
||||
LABEL=*)
|
||||
boot="$(echo $boot | sed 's,/,\\x2f,g')"
|
||||
boot="/dev/disk/by-label/${boot#LABEL=}"
|
||||
bootok=1 ;;
|
||||
block:UUID=*|UUID=*)
|
||||
boot="${boot#block:}"
|
||||
boot="/dev/disk/by-uuid/${root#UUID=}"
|
||||
bootok=1 ;;
|
||||
;;
|
||||
UUID=*)
|
||||
boot="/dev/disk/by-uuid/${boot#UUID=}"
|
||||
;;
|
||||
/dev/*)
|
||||
bootok=1 ;;
|
||||
;;
|
||||
*)
|
||||
die "You have to specify boot=<boot device> as a boot option for fips=1" ;;
|
||||
esac
|
||||
|
@@ -21,5 +21,5 @@ if [ "$root" = "dhcp" ] || [ "$root" = "dhcp6" ] || [ "$netroot" = "dhcp" ] ; th
|
||||
|
||||
# Shut up init error check
|
||||
[ -z "$root" ] && root="dhcp"
|
||||
echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue-finished/dhcp.sh
|
||||
echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue/finished/dhcp.sh
|
||||
fi
|
||||
|
@@ -9,7 +9,7 @@ if getargbool 1 rd.splash -n rd_NO_SPLASH; then
|
||||
|
||||
info "Starting Gentoo Splash"
|
||||
|
||||
/lib/udev/console_init tty0
|
||||
[ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
|
||||
CDROOT=0
|
||||
. /lib/gensplash-lib.sh
|
||||
splash init
|
||||
|
@@ -17,8 +17,8 @@ if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
|
||||
[ -e /dev/fb ] || ln -s fb0 /dev/fb
|
||||
|
||||
info "Starting plymouth daemon"
|
||||
[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
|
||||
>/run/initramfs/plymouth
|
||||
/lib/udev/console_init tty0
|
||||
mkdir -m 0755 -p /run/plymouth
|
||||
[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
|
||||
[ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
|
||||
/bin/plymouth --show-splash 2>&1 | vinfo
|
||||
fi
|
||||
|
@@ -8,7 +8,7 @@ case "$root" in
|
||||
${root#live:/dev/}
|
||||
printf 'SYMLINK=="%s", SYMLINK+="live"\n' \
|
||||
${root#live:/dev/}
|
||||
} >> /dev/.udev/rules.d/99-live-mount.rules
|
||||
} >> $UDEVRULESD/99-live-mount.rules
|
||||
{
|
||||
printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
|
||||
${root#live:/dev/}
|
||||
|
@@ -90,6 +90,9 @@ options=${options:+$options,}$nfsrw
|
||||
[ -x /sbin/rpcbind ] && [ -z "$(pidof rpcbind)" ] && rpcbind
|
||||
|
||||
if [ "$nfs" = "nfs4" ]; then
|
||||
[ ! -d /var/lib/nfs/rpc_pipefs/nfs ] && \
|
||||
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
|
||||
|
||||
# Start rpc.statd as mount won't let us use locks on a NFSv4
|
||||
# filesystem without talking to it. NFSv4 does locks internally,
|
||||
# rpc.lockd isn't needed
|
||||
|
@@ -98,7 +98,7 @@ getargbool() {
|
||||
_b=$(getarg "$@")
|
||||
[ $? -ne 0 -a -z "$_b" ] && _b=$_default
|
||||
if [ -n "$_b" ]; then
|
||||
[ $_b -eq 0 ] && return 1
|
||||
[ $_b = "0" ] && return 1
|
||||
[ $_b = "no" ] && return 1
|
||||
fi
|
||||
return 0
|
||||
@@ -236,8 +236,8 @@ source_conf() {
|
||||
|
||||
die() {
|
||||
{
|
||||
echo "<1>dracut: FATAL: $@";
|
||||
echo "<1>dracut: Refusing to continue";
|
||||
echo "<24>dracut: FATAL: $@";
|
||||
echo "<24>dracut: Refusing to continue";
|
||||
} > /dev/kmsg
|
||||
|
||||
{
|
||||
@@ -260,14 +260,14 @@ check_quiet() {
|
||||
|
||||
warn() {
|
||||
check_quiet
|
||||
echo "<4>dracut Warning: $@" > /dev/kmsg
|
||||
echo "<28>dracut Warning: $@" > /dev/kmsg
|
||||
[ "$DRACUT_QUIET" != "yes" ] && \
|
||||
echo "dracut Warning: $@" >&2
|
||||
}
|
||||
|
||||
info() {
|
||||
check_quiet
|
||||
echo "<6>dracut: $@" > /dev/kmsg
|
||||
echo "<30>dracut: $@" > /dev/kmsg
|
||||
[ "$DRACUT_QUIET" != "yes" ] && \
|
||||
echo "dracut: $@"
|
||||
}
|
||||
|
@@ -234,7 +234,7 @@ while :; do
|
||||
strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \
|
||||
ID_CDROM_MEDIA && continue
|
||||
|
||||
if [ -e "$cdrom"/events_poll_msecs -a -n -e "/tmp/.poll_${cdrom##*/}" ]; then
|
||||
if [ -e "$cdrom"/events_poll_msecs -a ! -e "/tmp/.poll_${cdrom##*/}" ]; then
|
||||
msecs=$(while read a; do echo $a;done < "$cdrom"/events_poll_msecs)
|
||||
if [ "$msecs" = "-1" ]; then
|
||||
echo 250 > "$cdrom"/events_poll_msecs
|
||||
@@ -373,21 +373,22 @@ info "Switching root"
|
||||
|
||||
wait_for_loginit
|
||||
|
||||
export PATH="$OLD_PATH"
|
||||
|
||||
if [ -d "$NEWROOT"/run ]; then
|
||||
mount --move /run "$NEWROOT"/run
|
||||
else
|
||||
if [ -e /run/initramfs ]; then
|
||||
mkdir -m 0755 /dev/.initramfs
|
||||
cp -axr /run/initramfs/* /dev/.initramfs >/dev/null 2>&1
|
||||
fi
|
||||
if [ -e /run/mdadm ]; then
|
||||
mkdir -m 0755 /dev/.mdadm
|
||||
cp -axr /run/mdadm/* /dev/.mdadm >/dev/null 2>&1
|
||||
cp -axr /run/initramfs /dev/.initramfs >/dev/null 2>&1
|
||||
if [ -e /run/initramfs/live ]; then
|
||||
mkdir -m 0755 /dev/.initramfs/live
|
||||
mount --move /run/initramfs/live /dev/.initramfs/live
|
||||
fi
|
||||
fi
|
||||
umount -l /run
|
||||
fi
|
||||
|
||||
export PATH="$OLD_PATH"
|
||||
|
||||
if [ -f /etc/capsdrop ]; then
|
||||
. /etc/capsdrop
|
||||
info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped."
|
||||
|
Reference in New Issue
Block a user