static usb ethnet addresses
[automated-distro-installer] / wrt-init
1 #!/bin/sh
2 # This file is part of Ian Kelling's automated-distro-installer
3 # Copyright (C) 2024 Ian Kelling
4
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 set -xe
20 # librecmc 1.5.1 is missing nfs-kernel-server and screen
21 source /etc/os-release
22 if [ "$ID" == librecmc ] && [ "$VERSION" == v1.5.1-core ]; then
23 cat >/etc/opkg/customfeeds.conf <<'EOF'
24 src/gz openwrt_packages http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/packages
25 fi
26 EOF
27 fi
28
29 if ! opkg list-installed|grep bash; then
30 opkg update
31 opkg install bash
32 fi
33
34 if [ -f /root/bash-bear ]; then
35 mkdir -p /usr/local/lib
36 mv /root/bash-bear /usr/local/lib
37 fi
38
39 # this isnt used anymore
40 export HOME_DOMAIN=$1
41 shift
42 wrt-setup-local "$@"