add kexec service

This commit is contained in:
gh2o 2014-07-13 20:23:17 -07:00
parent 3dc400e459
commit 4fccd6414b
1 changed files with 14 additions and 0 deletions

View File

@ -269,6 +269,20 @@ ConditionPathExists=/installer/script.sh
[Service]
Type=oneshot
ExecStart=/installer/script.sh
EOF
mkdir -p ${unitdir}/sysinit.target.wants
ln -s ../arch-kernel.service ${unitdir}/sysinit.target.wants
cat > ${unitdir}/arch-kernel.service <<EOF
[Unit]
Description=Reboots into arch kernel
ConditionKernelCommandLine=!archkernel
DefaultDependencies=no
Before=local-fs-pre.target systemd-remount-fs.service
[Service]
Type=oneshot
ExecStart=/sbin/kexec /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdline --command-line=archkernel
EOF
}