Copy systemd units before setup

This commit is contained in:
Takumi Sueda 2023-07-28 20:43:26 +09:00
parent d534aa7416
commit b242f06d78
4 changed files with 11 additions and 6 deletions

View File

@ -150,6 +150,7 @@ brainux:
fi
sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/
sudo cp ./os-brainux/setup_brainux.sh brainux/
sudo ./os-brainux/override-pre.sh ./os-brainux/override ./brainux
sudo -E chroot brainux /setup_brainux.sh
sudo rm brainux/setup_brainux.sh
sudo ./os-brainux/override.sh ./os-brainux/override ./brainux

10
os-brainux/override-pre.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -uex -o pipefail
SRC=$1
DST=$2
install -g root -o root -m 0644 $SRC/lib/systemd/system/boot.mount $DST/lib/systemd/system/boot.mount
install -g root -o root -m 0644 $SRC/lib/systemd/system/rndis_gadget.service $DST/lib/systemd/system/rndis_gadget.service
install -g root -o root -m 0755 $SRC/usr/bin/enable_rndis_gadget $DST/usr/bin/enable_rndis_gadget

View File

@ -19,8 +19,3 @@ install -g 1000 -o 1000 -m 0644 $SRC/home/user/.config/fcitx/profile $DST/home/u
sudo -u#1000 -g#1000 mkdir -p $DST/home/user/lxterminal
install -g 1000 -o 1000 -m 0644 $SRC/home/user/lxterminal/lxterminal.conf $DST/home/user/lxterminal/lxterminal.conf
install -g root -o root -m 0644 -D $SRC/etc/jwm/system.jwmrc $DST/etc/jwm/system.jwmrc
install -g root -o root -m 0644 $SRC/lib/systemd/system/boot.mount $DST/lib/systemd/system/boot.mount
install -g root -o root -m 0644 $SRC/lib/systemd/system/rndis_gadget.service $DST/lib/systemd/system/rndis_gadget.service
install -g root -o root -m 0755 $SRC/usr/bin/enable_rndis_gadget $DST/usr/bin/enable_rndis_gadget

View File

@ -137,7 +137,6 @@ ttyLP0
EOF
# Enable /boot mount
systemctl daemon-reload
systemctl enable boot.mount
# Enable RNDIS gadget