diff --git a/pkg/init/build b/pkg/init/build index fcd87fc..bec0b8a 100755 --- a/pkg/init/build +++ b/pkg/init/build @@ -34,6 +34,9 @@ deploy() { if [ -e "$SCRIPTDIR/product/$PRODUCT/INIT" ]; then source "$SCRIPTDIR/product/$PRODUCT/INIT" fi + if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/INIT" ]; then + source "$SCRIPTDIR/product/$PRODUCT/$BOARD/INIT" + fi if [ "x$HWCLOCK" == "xyes" ]; then ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock" diff --git a/product/router/dnsmasq.conf.alix b/product/router/alix/dnsmasq.conf similarity index 100% rename from product/router/dnsmasq.conf.alix rename to product/router/alix/dnsmasq.conf diff --git a/product/router/interfaces.alix/port0 b/product/router/alix/interfaces/port0 similarity index 100% rename from product/router/interfaces.alix/port0 rename to product/router/alix/interfaces/port0 diff --git a/product/router/interfaces.alix/port1 b/product/router/alix/interfaces/port1 similarity index 100% rename from product/router/interfaces.alix/port1 rename to product/router/alix/interfaces/port1 diff --git a/product/router/interfaces.alix/port2 b/product/router/alix/interfaces/port2 similarity index 100% rename from product/router/interfaces.alix/port2 rename to product/router/alix/interfaces/port2 diff --git a/product/router/dnsmasq.conf.rpi3 b/product/router/rpi3/dnsmasq.conf similarity index 100% rename from product/router/dnsmasq.conf.rpi3 rename to product/router/rpi3/dnsmasq.conf diff --git a/util/misc.sh b/util/misc.sh index 7967061..64ec99b 100644 --- a/util/misc.sh +++ b/util/misc.sh @@ -1,20 +1,18 @@ file_path_override() { - local fname="$1" - - if [ -e "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}" ]; then - echo "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}" + if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" ]; then + echo "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" return fi - if [ -e "$SCRIPTDIR/product/$PRODUCT/$fname" ]; then - echo "$SCRIPTDIR/product/$PRODUCT/$fname" + if [ -e "$SCRIPTDIR/product/$PRODUCT/$1" ]; then + echo "$SCRIPTDIR/product/$PRODUCT/$1" return fi - if [ -e "$SCRIPTDIR/board/$BOARD/$fname" ]; then - echo "$SCRIPTDIR/board/$BOARD/$fname" + if [ -e "$SCRIPTDIR/board/$BOARD/$1" ]; then + echo "$SCRIPTDIR/board/$BOARD/$1" return fi - if [ -e "$SCRIPTDIR/product/common/$fname" ]; then - echo "$SCRIPTDIR/product/common/$fname" + if [ -e "$SCRIPTDIR/product/common/$1" ]; then + echo "$SCRIPTDIR/product/common/$1" return fi } @@ -28,19 +26,17 @@ cat_file_override() { } cat_file_merge() { - local fname="$1" - - if [ -e "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}" ]; then - cat "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}" + if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" ]; then + cat "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" fi - if [ -e "$SCRIPTDIR/product/$PRODUCT/$fname" ]; then - cat "$SCRIPTDIR/product/$PRODUCT/$fname" + if [ -e "$SCRIPTDIR/product/$PRODUCT/$1" ]; then + cat "$SCRIPTDIR/product/$PRODUCT/$1" fi - if [ -e "$SCRIPTDIR/board/$BOARD/$fname" ]; then - cat "$SCRIPTDIR/board/$BOARD/$fname" + if [ -e "$SCRIPTDIR/board/$BOARD/$1" ]; then + cat "$SCRIPTDIR/board/$BOARD/$1" fi - if [ -e "$SCRIPTDIR/product/common/$fname" ]; then - cat "$SCRIPTDIR/product/common/$fname" + if [ -e "$SCRIPTDIR/product/common/$1" ]; then + cat "$SCRIPTDIR/product/common/$1" fi }