On 10/28/2014 4:39 AM, Peter Maloney wrote: > Hi, I had the following problem: > >> # shorewall restart >> Compiling... >> Processing /etc/shorewall/params ... >> Processing /etc/shorewall/shorewall.conf... >> Loading Modules... >> Compiling /etc/shorewall/zones... >> Compiling /etc/shorewall/interfaces... >> Compiling /etc/shorewall/hosts... >> Determining Hosts in Zones... >> Locating Action Files... >> Compiling /etc/shorewall/policy... >> Running /etc/shorewall/initdone... >> Compiling Kernel Route Filtering... >> Compiling Martian Logging... >> Compiling MAC Filtration -- Phase 1... >> Compiling /etc/shorewall/rules... >> Compiling /etc/shorewall/conntrack... >> Compiling MAC Filtration -- Phase 2... >> Applying Policies... >> Compiling /usr/share/shorewall/action.Drop for chain Drop... >> Compiling /usr/share/shorewall/action.Broadcast for chain Broadcast... >> Generating Rule Matrix... >> Creating iptables-restore input... >> Shorewall configuration compiled to /var/lib/shorewall/.restart >> /var/lib/shorewall/.restart: line 2168: syntax error near unexpected >> token `=' >> /var/lib/shorewall/.restart: line 2168: ` BASH_FUNC_mc()=' >> /var/lib/shorewall/.restart: line 2168: syntax error near unexpected >> token `=' >> /var/lib/shorewall/.restart: line 2168: ` BASH_FUNC_mc()=' > > Line 2168 in the script says only: > >> BASH_FUNC_mc()= > > Which is invalid syntax. > > The shebang in the file is: > >> #!/bin/sh > > I tested with my /bin/sh link set to /bin/bash and also /bin/dash. Both > failed the same way. > > The correct syntax (to remove a function) in that file would be: > >> unset -f BASH_FUNC_mc > > > Without the "-f" would work in bash, but not in sh or dash. So make sure > to use -f. (I verified this with Linux dash vs Linux bash vs FreeBSD sh, > where -f is required in dash or sh, and the bash help also says to use > it but it works without it) > > It is a file that is generated by shorewall, overwritten each time I run > "shorewall restart" > > bleve on freenode irc helped me with this; he figured out that this is > the result of midnight commander being installed on the system, > polluting the environment via /etc/profile.d/mc.sh > Uninstalling midnight commander solved this for me, but a proper > solution would be to fix the generation of the file for others that > actually use midnight commander or other things that may trigger the > same problem. > > I am using shorewall version 4.5.20.
This problem does not occur with the current version of Shorewall (4.6.4). -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------
_______________________________________________ Shorewall-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-devel
