mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Improve upgrade procedure for board support package
This commit is contained in:
@@ -46,6 +46,11 @@ create_board_package()
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
[ "$1" = "upgrade" ] && touch /var/run/.reboot_required
|
[ "$1" = "upgrade" ] && touch /var/run/.reboot_required
|
||||||
[ -d "/boot/bin" ] && mv /boot/bin /boot/bin.old
|
[ -d "/boot/bin" ] && mv /boot/bin /boot/bin.old
|
||||||
|
if [ -L "/etc/network/interfaces" ]; then
|
||||||
|
cp /etc/network/interfaces /etc/network/interfaces.tmp
|
||||||
|
rm /etc/network/interfaces
|
||||||
|
mv /etc/network/interfaces.tmp /etc/network/interfaces
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -56,16 +61,11 @@ create_board_package()
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
update-rc.d armhwinfo defaults >/dev/null 2>&1
|
update-rc.d armhwinfo defaults >/dev/null 2>&1
|
||||||
update-rc.d -f motd remove >/dev/null 2>&1
|
update-rc.d -f motd remove >/dev/null 2>&1
|
||||||
if [ -L "/etc/network/interfaces" ]; then
|
|
||||||
cp /etc/network/interfaces /etc/network/interfaces.tmp
|
|
||||||
rm /etc/network/interfaces
|
|
||||||
mv /etc/network/interfaces.tmp /etc/network/interfaces
|
|
||||||
fi
|
|
||||||
[ ! -f "/etc/network/interfaces" ] && cp /etc/network/interfaces.default /etc/network/interfaces
|
[ ! -f "/etc/network/interfaces" ] && cp /etc/network/interfaces.default /etc/network/interfaces
|
||||||
[ -f "/root/.nand1-allwinner.tgz" ] && rm /root/.nand1-allwinner.tgz
|
[ -f "/root/.nand1-allwinner.tgz" ] && rm /root/.nand1-allwinner.tgz
|
||||||
[ -f "/root/nand-sata-install" ] && rm /root/nand-sata-install
|
[ -f "/root/nand-sata-install" ] && rm /root/nand-sata-install
|
||||||
ln -sf /var/run/motd /etc/motd
|
ln -sf /var/run/motd /etc/motd
|
||||||
[ -f "/etc/bash.bashrc.custom" ] && rm /etc/bash.bashrc.custom
|
[ -f "/etc/bash.bashrc.custom" ] && mv /etc/bash.bashrc.custom /etc/bash.bashrc.custom.old
|
||||||
[ -f "/etc/update-motd.d/00-header" ] && rm /etc/update-motd.d/00-header
|
[ -f "/etc/update-motd.d/00-header" ] && rm /etc/update-motd.d/00-header
|
||||||
[ -f "/etc/update-motd.d/10-help-text" ] && rm /etc/update-motd.d/10-help-text
|
[ -f "/etc/update-motd.d/10-help-text" ] && rm /etc/update-motd.d/10-help-text
|
||||||
if [ -f "/boot/bin/$BOARD.bin" ] && [ ! -f "/boot/script.bin" ]; then ln -sf bin/$BOARD.bin /boot/script.bin >/dev/null 2>&1 || cp /boot/bin/$BOARD.bin /boot/script.bin; fi
|
if [ -f "/boot/bin/$BOARD.bin" ] && [ ! -f "/boot/script.bin" ]; then ln -sf bin/$BOARD.bin /boot/script.bin >/dev/null 2>&1 || cp /boot/bin/$BOARD.bin /boot/script.bin; fi
|
||||||
@@ -80,7 +80,8 @@ create_board_package()
|
|||||||
/boot/.verbose
|
/boot/.verbose
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# trigget uInitrd creation after installation, just in case
|
# trigger uInitrd creation after installation, to apply
|
||||||
|
# /etc/initramfs/post-update.d/99-uboot
|
||||||
cat <<-EOF > $destination/DEBIAN/triggers
|
cat <<-EOF > $destination/DEBIAN/triggers
|
||||||
activate update-initramfs
|
activate update-initramfs
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user