ufw: switch to systemd, drop openrc support.

This commit is contained in:
Juan RP 2011-10-11 04:02:23 +02:00
parent baf3144ae4
commit 0ba35a8a0e
3 changed files with 13 additions and 27 deletions

View file

@ -1,23 +0,0 @@
#!/sbin/runscript
depend() {
before net
}
start() {
ebegin "Starting ufw"
/lib/ufw/ufw-init start
eend $?
}
stop() {
ebegin "Stopping ufw"
/lib/ufw/ufw-init stop
eend $?
}
restart() {
ebegin "Restarting ufw"
/lib/ufw/ufw-init restart
eend $?
}

View file

@ -0,0 +1,11 @@
[Unit]
Description=CLI Netfilter Manager
[Service]
Type=oneshot
ExecStart=/lib/ufw/ufw-init start
ExecStop=/lib/ufw/ufw-init stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View file

@ -1,7 +1,7 @@
# Template file for 'ufw'
pkgname=ufw
version=0.30.1
revision=4
revision=5
distfiles="http://launchpad.net/ufw/0.30/$version/+download/$pkgname-$version.tar.gz"
build_style=python-module
short_desc="Uncomplicated Firewall"
@ -17,7 +17,6 @@ long_desc="
noarch=yes
pycompile_module="ufw"
conf_files="/etc/default/ufw /etc/ufw/ufw.conf"
openrc_services="ufw default false"
Add_dependency run iptables
Add_dependency run python
@ -27,6 +26,5 @@ Add_dependency build gettext
post_install()
{
# OpenRC service to start/stop ufw.
vinstall ${FILESDIR}/ufw.rc 755 etc/init.d ufw
vinstall ${FILESDIR}/ufw.service 644 lib/systemd/system
}