Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
preinit_set_mac_address() {
|
||||
. /lib/functions.sh
|
||||
|
||||
case $(board_name) in
|
||||
meraki,mr24|\
|
||||
meraki,mx60)
|
||||
mac_lan=$(mtd_get_mac_binary_ubi board-config 0x66)
|
||||
[ -n "$mac_lan" ] && ip link set eth0 address "$mac_lan"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_set_mac_address
|
||||
@@ -0,0 +1,5 @@
|
||||
apm821xx_set_preinit_iface() {
|
||||
ifname=eth0
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main apm821xx_set_preinit_iface
|
||||
18
target/linux/apm821xx/base-files/lib/preinit/79_move_config
Normal file
18
target/linux/apm821xx/base-files/lib/preinit/79_move_config
Normal file
@@ -0,0 +1,18 @@
|
||||
BOOTPART=/dev/sda1
|
||||
|
||||
move_config() {
|
||||
. /lib/functions.sh
|
||||
. /lib/upgrade/common.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
wd,mybooklive)
|
||||
if [ -b $BOOTPART ]; then
|
||||
mkdir -p /boot
|
||||
mount -t ext4 -o rw,noatime $BOOTPART /boot
|
||||
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
Reference in New Issue
Block a user