Make using the version from the current directory explicit
Rather than looking at the contents of the current directory always, require explicitly specifying --local to use those filesmaster
parent
ab81170e59
commit
5c481d345f
24
dracut
24
dracut
|
@ -7,12 +7,6 @@
|
||||||
# Copyright 2008, Red Hat, Inc. Jeremy Katz <katzj@redhat.com>
|
# Copyright 2008, Red Hat, Inc. Jeremy Katz <katzj@redhat.com>
|
||||||
# GPLv2 header here
|
# GPLv2 header here
|
||||||
|
|
||||||
if [ -f ./dracut-functions ]; then
|
|
||||||
source ./dracut-functions
|
|
||||||
else
|
|
||||||
source /usr/libexec/dracut/functions
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f /etc/dracut.conf ] && . /etc/dracut.conf
|
[ -f /etc/dracut.conf ] && . /etc/dracut.conf
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
|
@ -29,6 +23,10 @@ while [ $# -gt 0 ]; do
|
||||||
set -x
|
set -x
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-l|--local)
|
||||||
|
allowlocal="yes"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
break
|
break
|
||||||
esac
|
esac
|
||||||
|
@ -50,6 +48,16 @@ if [ -f "$outfile" -a -z "$force" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$allowlocal" -a -f ./init ]; then
|
||||||
|
source ./dracut-functions
|
||||||
|
initfile=./init
|
||||||
|
switchroot=./switchroot
|
||||||
|
else
|
||||||
|
source /usr/libexec/dracut/functions
|
||||||
|
initfile=/usr/libexec/dracut/init
|
||||||
|
switchroot=/usr/libexec/dracut/switch_root
|
||||||
|
fi
|
||||||
|
|
||||||
initdir=$(mktemp -d -t initramfs.XXXXXX)
|
initdir=$(mktemp -d -t initramfs.XXXXXX)
|
||||||
|
|
||||||
# executables that we have to have
|
# executables that we have to have
|
||||||
|
@ -78,8 +86,8 @@ done
|
||||||
for f in $(find /lib/terminfo -type f) ; do cp --parents $f "$initdir" ; done
|
for f in $(find /lib/terminfo -type f) ; do cp --parents $f "$initdir" ; done
|
||||||
|
|
||||||
# install our files
|
# install our files
|
||||||
cp init $initdir/init
|
cp $initfile $initdir/init
|
||||||
cp switch_root $initdir/sbin/switch_root
|
cp $switchroot $initdir/sbin/switch_root
|
||||||
|
|
||||||
# and create some directory structure
|
# and create some directory structure
|
||||||
mkdir -p $initdir/etc $initdir/proc $initdir/sys $initdir/sysroot $initdir/dev/pts
|
mkdir -p $initdir/etc $initdir/proc $initdir/sys $initdir/sysroot $initdir/dev/pts
|
||||||
|
|
Loading…
Reference in New Issue