summaryrefslogtreecommitdiff
path: root/usr/src/cmd/svc/shell
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-05-02 11:41:50 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-05-02 11:41:50 +0000
commit7aee23a10c59bb8b0a3f41e8b38fa2d7072ae8fa (patch)
treed8bfb80066f431c42ee8176bf4ad5775005b7cbb /usr/src/cmd/svc/shell
parentd006a4cbd4e9a251a94eec493f1618a9e452992a (diff)
parent545f15ae81ab124ab97b965c15f2873e0228fcb3 (diff)
downloadillumos-joyent-7aee23a10c59bb8b0a3f41e8b38fa2d7072ae8fa.tar.gz
[illumos-gate merge]
commit 545f15ae81ab124ab97b965c15f2873e0228fcb3 6883 SMF nis/client ipfilter support needs improvement commit 2bd8b3545dceb97f56401b7ad2a327e08d520574 6881 SMF ipfilter tries to unload module in zones 6882 SMF ipfilter lacks a property for a IPv6 custom policy file 6884 SMF ipfilter tuple_get_port needs to remove backslashes commit d14b1d19b404dcc4795d8a76751a186717a0ddaa 6934 add kstat to track anon memory reservation failure (ENOMEM) commit c22cda1b41022b307ea9fda8c9dc19e6329a109a 6847 syscall header declaration incorrect Conflicts: usr/src/uts/common/vm/vm_anon.c usr/src/uts/common/sys/zone.h usr/src/uts/common/os/zone.c
Diffstat (limited to 'usr/src/cmd/svc/shell')
-rw-r--r--usr/src/cmd/svc/shell/ipf_include.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr/src/cmd/svc/shell/ipf_include.sh b/usr/src/cmd/svc/shell/ipf_include.sh
index bb41e2ac49..5082f2a9e0 100644
--- a/usr/src/cmd/svc/shell/ipf_include.sh
+++ b/usr/src/cmd/svc/shell/ipf_include.sh
@@ -458,7 +458,7 @@ append_new_nat_rules()
#
tuple_get_port()
{
- port_str=`echo "$1" | sed -e 's/ //g; s/.*://' 2>/dev/null`
+ port_str=`echo "$1" | sed -e 's/ //g; s/\\\//g; s/.*://' 2>/dev/null`
[ -z "$port_str" ] && return 1
echo $port_str | grep "-" >/dev/null
@@ -546,6 +546,22 @@ custom_set_symlink()
}
#
+# Make IP6FILCONF, /var/tmp/ipf/ipf6.conf, a symlink to the input file argument.
+#
+custom_set_symlink_6()
+{
+ #
+ # Nothing to do if the input file doesn't exist.
+ #
+ [ ! -f "$1" ] && return 0
+
+ check_ipf_dir || return 1
+
+ rm $IP6FILCONF >/dev/null 2>&1
+ ln -s $1 $IP6FILCONF >/dev/null 2>&1
+}
+
+#
# New file replaces original file if they have different content
#
replace_file()
@@ -883,7 +899,7 @@ create_global_rules()
file6=`global_get_prop_value $FW_CONFIG_DEF_PG $CUSTOM_FILE_6_PROP`
[ -n "$file" ] && custom_set_symlink $file
- [ -n "$file6" ] && custom_set_symlink $file6
+ [ -n "$file6" ] && custom_set_symlink_6 $file6
return 0
fi