nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
This commit is contained in:
parent
550eed06e0
commit
ee178b7d57
190 changed files with 5 additions and 6 deletions
18
unprocessed/config/scripts/arch-kexec
Executable file
18
unprocessed/config/scripts/arch-kexec
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
# Set variables
|
||||
name="${1:-linux}"
|
||||
kernel="/boot/vmlinuz-$name"
|
||||
initrd="/boot/initramfs-$name.img"
|
||||
|
||||
# Test if required files are present
|
||||
[ -f $kernel ]
|
||||
[ -f $initrd ]
|
||||
command -v kexec &> /dev/null
|
||||
|
||||
# Configure the next kernel to load
|
||||
sudo kexec -l $kernel --initrd=$initrd --reuse-cmdline
|
||||
# Gracefully restart on the next kernel
|
||||
sudo systemctl kexec
|
Loading…
Add table
Add a link
Reference in a new issue