Compare commits
9 Commits
openrc-0.1
...
openrc-0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ded282f163 | ||
|
|
38ae822077 | ||
|
|
611ed42044 | ||
|
|
3f719bbb8b | ||
|
|
e37b84a37d | ||
|
|
9fdee75936 | ||
|
|
dd261a2a54 | ||
|
|
b36ef234be | ||
|
|
a2c3660b87 |
@@ -1,3 +1,3 @@
|
|||||||
NAME= openrc
|
NAME= openrc
|
||||||
VERSION= 0.11.4
|
VERSION= 0.11.6
|
||||||
PKG= ${NAME}-${VERSION}
|
PKG= ${NAME}-${VERSION}
|
||||||
|
|||||||
@@ -1,20 +1,40 @@
|
|||||||
# Depending on how mounting your network file systems behaves when your
|
# You will need to set the dependencies in the netmount script to match
|
||||||
# network interfaces are down, you may need to set the netmount script to
|
# the network configuration tools you are using. This should be done in
|
||||||
# require specific network interfaces to be active. This file gives
|
# this file by following the examples below, and not by changing the
|
||||||
# examples of how to do this:
|
# service script itself.
|
||||||
#
|
#
|
||||||
# If you are using newnet and configuring the interface with a static
|
# Each of these examples is meant to be used separately. So, for
|
||||||
# address with the network script:
|
# example, do not set rc_need to something like "net.eth0 dhcpcd".
|
||||||
# rc_need="network"
|
#
|
||||||
|
# If you are using newnet and configuring your interfaces with static
|
||||||
|
# addresses with the network script, you should use this setting.
|
||||||
|
#
|
||||||
|
#rc_need="network"
|
||||||
#
|
#
|
||||||
# If you are using oldnet, you must list the specific net.* services you
|
# If you are using oldnet, you must list the specific net.* services you
|
||||||
# need:
|
# need.
|
||||||
#
|
#
|
||||||
# rc_need="net.eth0"
|
# This example assumes all of your netmounts can be reached on
|
||||||
# rc_need="net.eth1 net.eth2"
|
# eth0.
|
||||||
|
#
|
||||||
|
#rc_need="net.eth0"
|
||||||
|
#
|
||||||
|
# This example assumes some of your netmounts are on eth1 and some
|
||||||
|
# are on eth2.
|
||||||
|
#
|
||||||
|
#rc_need="net.eth1 net.eth2"
|
||||||
#
|
#
|
||||||
# If you are using a dynamic network management tool like
|
# If you are using a dynamic network management tool like
|
||||||
# networkmanager, dhcpcd, etc, you should list that tool here.
|
# networkmanager, dhcpcd in standalone mode, wicd, badvpn-ncd, etc, to
|
||||||
|
# manage the network interfaces with the routes to your netmounts, you
|
||||||
|
# should list that tool.
|
||||||
#
|
#
|
||||||
# rc_need="networkmanager"
|
#rc_need="networkmanager"
|
||||||
# rc_need="dhcpcd"
|
#rc_need="dhcpcd"
|
||||||
|
#rc_need="wicd"
|
||||||
|
#
|
||||||
|
# The default setting is designed to be backward compatible with our
|
||||||
|
# current setup, but you are highly discouraged from using this. In
|
||||||
|
# other words, please change it to be more suited to your system.
|
||||||
|
#
|
||||||
|
rc_need="net"
|
||||||
|
|||||||
@@ -1137,6 +1137,13 @@
|
|||||||
# Hypothetical network card that requires a change-eeprom toggle to enable flashing
|
# Hypothetical network card that requires a change-eeprom toggle to enable flashing
|
||||||
#ethtool_order_eth0="change-eeprom flash change pause coalesce ring offload nfc rxfh-indir ntuple"
|
#ethtool_order_eth0="change-eeprom flash change pause coalesce ring offload nfc rxfh-indir ntuple"
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Firewalld support
|
||||||
|
# If you are using the firewalld daemon to configure your firewall
|
||||||
|
# settings and you have specific zones you want to apply to your
|
||||||
|
# interfaces, you can do this here.
|
||||||
|
#firewalld_zone_eth0="myzone"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# ADVANCED CONFIGURATION
|
# ADVANCED CONFIGURATION
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ start()
|
|||||||
|
|
||||||
if [ "$RC_UNAME" = Linux ]; then
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
no_netdev="-O no_netdev"
|
no_netdev="-O no_netdev"
|
||||||
|
if mountinfo -q /usr; then
|
||||||
|
touch $RC_SVCDIR/usr_premounted
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
ebegin "Mounting local filesystems"
|
ebegin "Mounting local filesystems"
|
||||||
mount -at "$types" $no_netdev
|
mount -at "$types" $no_netdev
|
||||||
@@ -48,7 +51,10 @@ stop()
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$RC_UNAME" = Linux ]; then
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*|/usr"
|
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*"
|
||||||
|
if [ -e $rc_svcdir/usr_premounted ]; then
|
||||||
|
no_umounts_r="$no_umounts_r|/usr"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
no_umounts_r="^($no_umounts_r)$"
|
no_umounts_r="^($no_umounts_r)$"
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ SRCS-Linux= iwconfig.sh.in
|
|||||||
INC-Linux= adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \
|
INC-Linux= adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \
|
||||||
ccwgroup.sh clip.sh ethtool.sh iproute2.sh ifplugd.sh ip6to4.sh \
|
ccwgroup.sh clip.sh ethtool.sh iproute2.sh ifplugd.sh ip6to4.sh \
|
||||||
ipppd.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh udhcpc.sh \
|
ipppd.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh udhcpc.sh \
|
||||||
vlan.sh macvlan.sh ip6rd.sh
|
vlan.sh macvlan.sh ip6rd.sh firewalld.sh
|
||||||
|
|
||||||
SRCS-NetBSD=
|
SRCS-NetBSD=
|
||||||
INC-NetBSD= ifwatchd.sh
|
INC-NetBSD= ifwatchd.sh
|
||||||
|
|||||||
38
net/firewalld.sh
Normal file
38
net/firewalld.sh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# Copyright (c) 2012 Doug Goldstein <cardoe@cardoe.com>
|
||||||
|
# Released under the 2-clause BSD license.
|
||||||
|
|
||||||
|
firewalld_depend()
|
||||||
|
{
|
||||||
|
after interface
|
||||||
|
before dhcp
|
||||||
|
program firewall-cmd
|
||||||
|
[ "$IFACE" != "lo" ] && need firewalld
|
||||||
|
}
|
||||||
|
|
||||||
|
_config_vars="$_config_vars firewalld_zone"
|
||||||
|
|
||||||
|
firewalld_post_start()
|
||||||
|
{
|
||||||
|
local firewalld_zone=
|
||||||
|
eval firewalld_zone=\$firewalld_zone_${IFVAR}
|
||||||
|
|
||||||
|
_exists || return 0
|
||||||
|
|
||||||
|
if [ "${IFACE}" != "lo" ]; then
|
||||||
|
firewall-cmd --zone="${firewalld_zone}" \
|
||||||
|
--change-interface="${IFACE}" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
firewalld_pre_stop()
|
||||||
|
{
|
||||||
|
_exists || return 0
|
||||||
|
|
||||||
|
if [ "${IFACE}" != "lo" ]; then
|
||||||
|
firewall-cmd --remove-interface="${IFACE}" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
@@ -43,7 +43,7 @@ fi
|
|||||||
rm -rf "@PREFIX@/run/openrc"
|
rm -rf "@PREFIX@/run/openrc"
|
||||||
cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc"
|
cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc"
|
||||||
rc-update -u
|
rc-update -u
|
||||||
rm -rf "@LIBEXECDIR@/init.d"
|
|
||||||
umount "@LIBEXECDIR@/init.d"
|
umount "@LIBEXECDIR@/init.d"
|
||||||
|
rm -rf "@LIBEXECDIR@/init.d"
|
||||||
einfo "The OpenRC dependency data was migrated successfully."
|
einfo "The OpenRC dependency data was migrated successfully."
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ if [ $(( CLEAN )) -eq 1 ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CREATE$REMOVE" == '00' ]; then
|
if [ "$CREATE$REMOVE" = '00' ]; then
|
||||||
printf 'usage: %s [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
|
printf 'usage: %s [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user