From: Arne Fitzenreiter Date: Sat, 7 Nov 2009 08:31:20 +0000 (+0100) Subject: Prevent deletion of language files at acpupsd uninstall. X-Git-Tag: v2.9-beta1~626 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=2b97bfefde7cb4124fbf83a29be2c0e42caba4f6 Prevent deletion of language files at acpupsd uninstall. Remove the language files from the pak. --- diff --git a/config/rootfiles/packages/apcupsd b/config/rootfiles/packages/apcupsd index 3b3273d345..7a5df79b3e 100644 --- a/config/rootfiles/packages/apcupsd +++ b/config/rootfiles/packages/apcupsd @@ -28,5 +28,3 @@ srv/web/ipfire/cgi-bin/upsstats.cgi #usr/share/man/man8/apcupsd.8 etc/rc.d/init.d/apcupsd var/ipfire/menu.d/EX-apcupsd.menu -var/ipfire/langs/de.pl -var/ipfire/langs/en.pl diff --git a/lfs/apcupsd b/lfs/apcupsd index 4e664fef1a..5638cabc3d 100644 --- a/lfs/apcupsd +++ b/lfs/apcupsd @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = apcupsd -PAK_VER = 3 +PAK_VER = 4 DEPS = "" diff --git a/src/paks/apcupsd/install.sh b/src/paks/apcupsd/install.sh new file mode 100644 index 0000000000..682363b5c7 --- /dev/null +++ b/src/paks/apcupsd/install.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +restore_backup ${NAME} diff --git a/src/paks/apcupsd/uninstall.sh b/src/paks/apcupsd/uninstall.sh new file mode 100644 index 0000000000..4e26837e2c --- /dev/null +++ b/src/paks/apcupsd/uninstall.sh @@ -0,0 +1,34 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service ${NAME} +make_backup ${NAME} +# +#Remove language files from rootfile to prevent deletion at uninstall +# +cat /opt/pakfire/db/rootfiles/apcupsd | \ + grep -v "var/ipfire/langs" > /opt/pakfire/db/rootfiles/apcupsd.tmp +mv /opt/pakfire/db/rootfiles/apcupsd.tmp /opt/pakfire/db/rootfiles/apcupsd +# +remove_files diff --git a/src/paks/apcupsd/update.sh b/src/paks/apcupsd/update.sh new file mode 100644 index 0000000000..89c40d0d7c --- /dev/null +++ b/src/paks/apcupsd/update.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh