systemd: check, that --prefix= does not contain /run

systemd will mount /run before dracut has a chance to copy over the
original content.
master
Harald Hoyer 2012-07-06 13:49:03 +02:00
parent a421016671
commit e09048aaf5
2 changed files with 9 additions and 4 deletions

View File

@ -779,7 +779,8 @@ export initdir dracutbasedir dracutmodules drivers \
use_fstab fstab_lines libdirs fscks nofscks \
stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
debug host_fs_types host_devs sshkey add_fstab \
DRACUT_VERSION udevdir systemdutildir systemdsystemunitdir
DRACUT_VERSION udevdir systemdutildir systemdsystemunitdir \
prefix

# Create some directory structure first
[[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}"

View File

@ -4,10 +4,9 @@

check() {
[[ $mount_needs ]] && return 1
if [[ -x /lib/systemd/systemd ]] || [[ -x /usr/lib/systemd/systemd ]]; then
return 255
if [[ -x $systemdutildir/systemd ]]; then
return 255
fi
[[ $systemdutildir ]] && return 255

return 1
}
@ -17,6 +16,11 @@ depends() {
}

install() {
if strstr "$prefix" "/run/"; then
dfatal "systemd does not work a prefix, which contains \"/run\"!!"
exit 1
fi

dracut_install -o \
$systemdutildir/systemd \
$systemdutildir/systemd-cgroups-agent \