Merge pull request #22 from TLINDEN/develop

Fix ipfw call
This commit is contained in:
T.v.Dein
2024-09-17 14:02:40 +02:00
committed by GitHub
4 changed files with 14 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ all:
rm -f src/_jaildk-completion.bash
install:
sh jaildk setup $JAILDIR
sh jaildk setup $(JAILDIR)
clean:
rm -f jaildk

1
TODO
View File

@@ -1,4 +1,3 @@
- fix the 3 mode commands to use -m so completion works correctly
- vnet ipv6 doesnt work anymore
UPDATE: with auto_linklocal seems to work after some seconds
- on reboot, no pf will be started

View File

@@ -21,6 +21,17 @@ reply_version() {
COMPREPLY=( $(compgen -W "${versions[*]}" -- "$cur") )
}
# we're taking the easy path here. There might be cases where the
# $name_enable variable doesn't match the actual rc-Script, which
# we will not catch the way we're doing it here, but these are rare
# and the user can specify something manually as well. Also this
# method is way faster than executing rcorder inside the jail
reply_rcscripts() {
local jail=${COMP_WORDS[2]}
local scripts=$(ls $JAILDIR/run/$jail/usr/local/etc/rc.d)
COMPREPLY=( $(compgen -W "${scripts[*]}" -- "$cur") )
}
functions='mount,ports,mtree,pf'
modes='start,stop,status,restart'
@@ -69,7 +80,7 @@ subcmd_opts_status=(-v)
subcmd_args_status=@jail
### sub cmd rc
subcmd_opts_rc=(-m:$modes -r)
subcmd_opts_rc=(-m:$modes -r:@rcscripts)
subcmd_args_rc=@jail
### sub cmd ipfw

View File

@@ -1343,7 +1343,7 @@ jaildk_jail() {
case $mode in
*)
service jail $mode $jail
jaildk_ipfw $jail $mode
jaildk_ipfw $jail -m $mode
;;
esac
fi