summaryrefslogtreecommitdiff
path: root/recipes-core
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-09-22 18:05:09 -0500
committerJohn Klug <john.klug@multitech.com>2020-11-12 09:30:36 -0600
commit883121429553a87fd47129a04454c0e875004809 (patch)
tree7f4103f8286ee48381e327278ed5ec4f7b1811c9 /recipes-core
parent11a92afb6d3bba51a66155d4bc0bbf1fad9b33e5 (diff)
downloadmeta-mlinux-883121429553a87fd47129a04454c0e875004809.tar.gz
meta-mlinux-883121429553a87fd47129a04454c0e875004809.tar.bz2
meta-mlinux-883121429553a87fd47129a04454c0e875004809.zip
Workaround for busybox patch -N failures, files missing from backup list
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/multitech/config-wifi-bt-ap_2.3.bb20
1 files changed, 12 insertions, 8 deletions
diff --git a/recipes-core/multitech/config-wifi-bt-ap_2.3.bb b/recipes-core/multitech/config-wifi-bt-ap_2.3.bb
index c440022..b754464 100644
--- a/recipes-core/multitech/config-wifi-bt-ap_2.3.bb
+++ b/recipes-core/multitech/config-wifi-bt-ap_2.3.bb
@@ -46,16 +46,20 @@ do_install () {
FILES_${PN} = "/usr/share/config-wifi-bt-ap"
pkg_postinst_${PN}() {
- if [ -n $D ] ; then
+ set -x
+ if [ -n "$D" ] ; then
echo "ERROR: /var/config should not be on a root image."
exit 1
fi
US="$D/usr/share/config-wifi-bt-ap"
ND="$D/etc/network"
- mkdir ${US}/old
+ if ! [ -d "${US}/old" ] ; then
+ mkdir ${US}/old
+ fi
cd /var/config
# Make a backup
- tar -T ${US}/backup.list.txt -cf $D/var/config/var-config-wifi-bt-ap-bkup.tar.gz
+ tar -T ${US}/backup.list.txt -cf $D/var/config/var-config-wifi-bt-ap-bkup.tar.gz || true
+
# Add new interfaces
if ! grep "^auto wifi1$" ${ND}/interfaces ; then
echo >>${ND}/interfaces
@@ -73,11 +77,11 @@ pkg_postinst_${PN}() {
md5sum $(cat ${US}/backup.list.txt) >$D/var/config/bkup-wifi-bt-ap.md5
# Restart daemons
- /etc/init.d/dnsmasq stop
- /etc/init.d/bt-pan stop
- /etc/init.d/bluetooth stop
- /etc/init.d/hostapd stop
- /etc/init.d/rs9113 stop
+ /etc/init.d/dnsmasq stop || true
+ /etc/init.d/bt-pan stop || true
+ /etc/init.d/bluetooth stop || true
+ /etc/init.d/hostapd stop || true
+ /etc/init.d/rs9113 stop || true
/etc/init.d/rs9113 start
/etc/init.d/bluetooth start
/etc/init.d/hostapd start