From: Yu Jiung Date: Tue, 6 Sep 2016 02:46:13 +0000 (+0900) Subject: Add upgrade script X-Git-Tag: accepted/tizen/common/20160907.154220^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F04%2F87004%2F1;p=platform%2Fcore%2Fconnectivity%2Fwifi-direct-manager.git Add upgrade script Change-Id: Ic1bd0041ed07c3cd7fccc61523d0e421da5ae9a6 Signed-off-by: Yu jiung --- diff --git a/packaging/wifi-direct-manager.spec b/packaging/wifi-direct-manager.spec index 5f05706..889c48c 100644 --- a/packaging/wifi-direct-manager.spec +++ b/packaging/wifi-direct-manager.spec @@ -1,6 +1,8 @@ +%define upgrade_script_path /usr/share/upgrade/scripts + Name: wifi-direct-manager Summary: Wi-Fi Direct manger -Version: 1.2.201 +Version: 1.2.202 Release: 1 Group: Network & Connectivity/Wireless License: Apache-2.0 @@ -8,6 +10,7 @@ Source0: %{name}-%{version}.tar.gz Source1: dbus-wfd-manager.conf Source2: net.wifidirect.service Source3: wifi-direct-manager.service +Source4: wifi-direct-manager_upgrade.sh BuildRequires: pkgconfig(capi-network-wifi-direct) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(dlog) @@ -54,9 +57,11 @@ chmod 644 %{SOURCE0} chmod 644 %{SOURCE1} chmod 644 %{SOURCE2} chmod 644 %{SOURCE3} +chmod 755 %{SOURCE4} cp -a %{SOURCE1} ./wfd-manager.conf cp -a %{SOURCE2} . cp -a %{SOURCE3} . +cp -a %{SOURCE4} . %build @@ -152,6 +157,8 @@ mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/ cp net.wifidirect.service %{buildroot}%{_datadir}/dbus-1/system-services/net.wifidirect.service mkdir -p %{buildroot}%{_libdir}/systemd/system/ cp wifi-direct-manager.service %{buildroot}%{_libdir}/systemd/system/wifi-direct-manager.service +mkdir -p %{buildroot}%{upgrade_script_path} +cp -f wifi-direct-manager_upgrade.sh %{buildroot}%{upgrade_script_path} %post chmod 644 %{TZ_SYS_RO_ETC}/wifi-direct/dhcpd.conf @@ -185,6 +192,7 @@ chmod 666 %{TZ_SYS_VAR}/lib/misc/dhcpd.leases %attr(644,root,root) %{_datadir}/dbus-1/system-services/* %attr(644,root,root) %{_libdir}/systemd/system/* %attr(755,-,-) %{_sbindir}/p2p_supp.sh +%{upgrade_script_path}/wifi-direct-manager_upgrade.sh %files -n wifi-direct-plugin-wpasupplicant %manifest wifi-direct-plugin-wpasupplicant.manifest diff --git a/packaging/wifi-direct-manager_upgrade.sh b/packaging/wifi-direct-manager_upgrade.sh new file mode 100644 index 0000000..112f4d5 --- /dev/null +++ b/packaging/wifi-direct-manager_upgrade.sh @@ -0,0 +1,14 @@ +#!/bin/sh +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +#-----------------------------------------------------# +# Wi-Fi Direct Manager patch for upgrade (2.4 -> 3.0) # +#-----------------------------------------------------# + +file1="persistent-peer" + +oldpath="/opt/etc/" + +/bin/rm -f $oldpath$file1 + +exit 0