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-09-24 09:44:04 -0500
commit6c1f0a51c700839be1ecca52ab06ec890c13762f (patch)
treea3f6b2f5dabd4cd9303cd7c64b3b9fc6d3413464 /recipes-core
parent1c30425f849d500cf47bb8208adc17454526d9c2 (diff)
downloadmeta-mlinux-6c1f0a51c700839be1ecca52ab06ec890c13762f.tar.gz
meta-mlinux-6c1f0a51c700839be1ecca52ab06ec890c13762f.tar.bz2
meta-mlinux-6c1f0a51c700839be1ecca52ab06ec890c13762f.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