SHA256
1
0
forked from pool/ufw

Accepting request 89394 from home:jluce2:opensuse11.4

OBS-URL: https://build.opensuse.org/request/show/89394
OBS-URL: https://build.opensuse.org/package/show/security/ufw?expand=0&rev=2
This commit is contained in:
luce johann 2011-10-26 13:56:02 +00:00 committed by Git OBS Bridge
parent 6323f6a58b
commit 3d1fc665fd
3 changed files with 88 additions and 1 deletions

61
ufw-init Normal file
View File

@ -0,0 +1,61 @@
#! /bin/bash
# Copyright (c) 2000-2002 SuSE GmbH Nuernberg, Germany.
# Copyright (C) 2003,2004 SUSE Linux AG
# Copyright (C) 2005-2008 SUSE LINUX Products GmbH
#
# Author: LUCE Johann
# Maintainer: LUCE Johann
#
# /etc/init.d/ufw
#
### BEGIN INIT INFO
# Provides: ufw
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: ufw_enable
# Description: Uncomplicated Firewall
### END INIT INFO
UFWALL="/usr/sbin/ufw"
test -x $UFWALL || exit 5
. /etc/rc.status
. /etc/ufw/ufw.conf
rc_reset
case "$1" in
start)
echo -n "checking if ufw enable"
if [ $ENABLED == 'yes' ] ;then
$UFWALL enable
else
echo -n "ufw is disable"
fi
rc_status -v
;;
stop)
rc_status
;;
restart|force-reload)
$O stop
$0 start
;;
try-restart|reload)
if ($0 status) >/dev/null 2>&1; then
$0 start
else
rc_reset
fi
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload|}"
exit 1
;;
esac
# Set exit status
rc_exit

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Oct 11 15:05:51 UTC 2011 - johann.luce@wanadoo.fr
bug on restart in init file-
-------------------------------------------------------------------
Mon Oct 10 16:13:12 UTC 2011 - johann.luce@wanadoo.fr
add opensuse init script -
-------------------------------------------------------------------
Thu Oct 6 21:17:36 UTC 2011 - johann.luce@wanadoo.fr

View File

@ -6,12 +6,13 @@ Group: Productivity/Networking/Security
License: GPLv3+
URL: http://launchpad.net/%{name}
Source0: %{name}-%{version}.tar.bz2
Source1: ufw-init
#BuildArch: noarch
BuildRequires: python-devel
BuildRequires: iptables-devel
#Requires: python
#Requires:
%description
The Uncomplicated Firewall(ufw) is a front-end for netfilter, which
aims to make it easier for people unfamiliar with firewall concepts.
@ -32,7 +33,19 @@ manipulating the firewall.
rm -rf %{buildroot}
python setup.py install --prefix=/usr \
--root %{buildroot}
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
install -m 755 $RPM_SOURCE_DIR/ufw-init $RPM_BUILD_ROOT/etc/init.d/ufw
ln -s /etc/init.d/ufw $RPM_BUILD_ROOT/usr/sbin/rcufw
mkdir -p $RPM_BUILD_ROOT/usr/bin/
ln -s /usr/sbin/ufw $RPM_BUILD_ROOT/usr/bin/ufw
%post
insserv /etc/init.d/ufw
%preun
%stop_on_removal ufw
%postun
%insserv_cleanup /etc/init.d/ufw
%files
%defattr(-,root,root)
@ -42,8 +55,11 @@ python setup.py install --prefix=/usr \
/lib/ufw/user6.rules
/usr/lib/python%python_version/site-packages/ufw-0.30.1-py%python_version.egg-info
/usr/sbin/ufw
/usr/sbin/rcufw
/usr/bin/ufw
/usr/share/man/man8/ufw-framework.8.gz
/usr/share/man/man8/ufw.8.gz
%config/etc/init.d/ufw
%config/etc/ufw
%config/etc/ufw/applications.d
%config/etc/default/ufw