Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
# Copyright (C) 2017 LEDE project
|
||||
|
||||
set_preinit_iface() {
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
raspberrypi,2-model-b |\
|
||||
raspberrypi,3-model-b |\
|
||||
raspberrypi,3-model-b-plus |\
|
||||
raspberrypi,model-b |\
|
||||
raspberrypi,model-b-plus |\
|
||||
raspberrypi,model-b-rev2)
|
||||
ifname=eth0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main set_preinit_iface
|
||||
20
target/linux/brcm2708/base-files/lib/preinit/79_move_config
Normal file
20
target/linux/brcm2708/base-files/lib/preinit/79_move_config
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
. /lib/upgrade/common.sh
|
||||
|
||||
BOOTPART=/dev/mmcblk0p1
|
||||
|
||||
move_config() {
|
||||
if [ -b $BOOTPART ]; then
|
||||
insmod nls_cp437
|
||||
insmod nls_iso8859-1
|
||||
insmod fat
|
||||
insmod vfat
|
||||
mkdir -p /boot
|
||||
mount -t vfat -o rw,noatime $BOOTPART /boot
|
||||
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
|
||||
fi
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
Reference in New Issue
Block a user