forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsync.sh
executable file
·30 lines (24 loc) · 911 Bytes
/
sync.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if [ -z "$1" ]; then
echo "Usage: $0 <host>"
exit 1
fi
HOST=$1
USER=${USER:-bazzite}
# openssl req -new -x509 -newkey rsa:2048 -keyout "key.pem" \
# -outform DER -out "cert.der" -nodes -days 36500 \
# -subj "/CN=antheas/"
# openssl x509 -in cert.der -inform DER -outform PEM -out key.cert.pem
# scp cert.der $host:/tmp/cert.der
# sudo mokutil --import "/tmp/cert.der"
make binrpm-pkg -j $(nproc)
# sudo sbsign --key key.pem --cert key.cert.pem ./arch/x86/boot/bzImage --output vmlinuz
# scp vmlinuz $HOST:/tmp/vmlinuz
# ssh $HOST /bin/bash << EOF
# sudo cp /tmp/vmlinuz /boot/vmlinuz
# sed -E 's#linux /ostree/.+\$#linux /vmlinuz#g' \
# /boot/loader/entries/ostree-2.conf | \
# sed -E 's#^title #title Kernel Swap of #g' | \
# sed -E 's#^version \\d#version 200#g' | \
# sudo tee /boot/loader/entries/ostree-100.conf
# sudo reboot
# EOF