diff options
Diffstat (limited to 'recipes-core')
-rw-r--r-- | recipes-core/multitech/config-wifi-bt-ap_2.3.bb | 20 |
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 |