summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-connectivity/bluez/bluez5_%.bbappend4
-rw-r--r--recipes-connectivity/hostapd/hostapd_%.bbappend4
-rw-r--r--recipes-core/multitech/config-wifi-bt-ap_2.3.bb20
-rw-r--r--recipes-support/libpwquality/libpwquality_1.3.0.bb14
4 files changed, 26 insertions, 16 deletions
diff --git a/recipes-connectivity/bluez/bluez5_%.bbappend b/recipes-connectivity/bluez/bluez5_%.bbappend
index 87cc0bf..c484558 100644
--- a/recipes-connectivity/bluez/bluez5_%.bbappend
+++ b/recipes-connectivity/bluez/bluez5_%.bbappend
@@ -74,7 +74,9 @@ INITSCRIPT_PARAMS_${PN}-rfcomm = "defaults 22 22"
INITSCRIPT_NAME_${PN}-mlinit = "bluetooth"
pkg_postinst_${PN}-bt-name() {
cd /$D
- patch -Np1 < $D/usr/share/bluez5/BT-Name.patch
+ if patch --dry-run -p1 < $D/usr/share/bluez5/BT-Name.patch ; then
+ patch -p1 < $D/usr/share/bluez5/BT-Name.patch
+ fi
}
pkg_prerm_${PN}-bt-name() {
diff --git a/recipes-connectivity/hostapd/hostapd_%.bbappend b/recipes-connectivity/hostapd/hostapd_%.bbappend
index 3c69a72..2686fa3 100644
--- a/recipes-connectivity/hostapd/hostapd_%.bbappend
+++ b/recipes-connectivity/hostapd/hostapd_%.bbappend
@@ -53,7 +53,9 @@ FILES_${PN}-cfg = "/etc/init.d/hostapd /etc/default/hostapd /etc/hostapd.conf"
pkg_postinst_${PN}-extra() {
cd /$D
- patch -Np1 < $D/usr/share/hostapd/WiFi-SSID.patch
+ if patch --dry-run -p1 < $D/usr/share/hostapd/WiFi-SSID.patch ; then
+ patch -p1 < $D/usr/share/hostapd/WiFi-SSID.patch
+ fi
}
pkg_prerm_${PN}-extra() {
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
diff --git a/recipes-support/libpwquality/libpwquality_1.3.0.bb b/recipes-support/libpwquality/libpwquality_1.3.0.bb
index e5179c9..d7b04d4 100644
--- a/recipes-support/libpwquality/libpwquality_1.3.0.bb
+++ b/recipes-support/libpwquality/libpwquality_1.3.0.bb
@@ -83,12 +83,14 @@ pkg_postinst_${PN}() {
LOG="logger -s -p user.info -t opkg\ libpwquality"
cd /
fi
- logsave=$(patch -p1 -N < "$PAM_CONFIGURE" 2>&1 || true)
- if [[ -n ${logsave} ]] ; then
- ${LOG} "In directory $(pwd)"
- ${LOG} "patch -p1 -N < $PAM_CONFIGURE"
- ${LOG} "${PN} patch: ${logsave}"
-
+ # -N busybox option for patch is broken
+ if patch --dry-run -p1 < "$PAM_CONFIGURE" ; then
+ logsave=$(patch -p1 < "$PAM_CONFIGURE" 2>&1 || true)
+ if [[ -n ${logsave} ]] ; then
+ ${LOG} "In directory $(pwd)"
+ ${LOG} "patch -p1 < $PAM_CONFIGURE"
+ ${LOG} "${PN} patch: ${logsave}"
+ fi
fi
}