I have been working with Shorewall on Openwrt and as most know it uses BusyBox for a majority of its tools. I have run into a problem using 4.05 when creating TC rules that will fail on with the built in sed of BusyBox. I have seen that there has been some compatibility created in the past for Openwrt to resolve some of these types of problems. I was wondering what the chances are that sed in the shell scripts could be modified to use a variable that could be configured in the shorewall.conf file? I have created gnu sed packages that I am using on the system. The default scripts in Openwrt expect the responses from BusyBoxe''s sed. So I just named the new sed package to sed-gnu. In doing this I can get the advance use of gnu sed that Shorewall needs and the BusyBox sed that Openwrt needs. I have then modified all of the shell scripts and libraries to use the sed-gnu binary instead. I know this may not be the best fix, but at least it would give some flexibility for some of the embedded systems. I am willing to create a diff that would have this already done and I could submit this if the Shorewall crew would accept it. I don''t like to have to maintain my own versions of this type of thing, it makes upgrading and management a nightmare. Please let me know what everyone thinks. Philip ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Philip S. Hempel wrote:> I have run into a problem using 4.05 when creating TC rules that will > fail on with the built in sed of BusyBox. > > I have seen that there has been some compatibility created in the past > for Openwrt to resolve some of these types of problems. > > I was wondering what the chances are that sed in the shell scripts could > be modified to use a variable that could be configured in the > shorewall.conf file?Philip, I really dislike that idea. It is adding a configuration option to work around a bug (or questionable feature) in another platform.> > I have created gnu sed packages that I am using on the system. The > default scripts in Openwrt expect the responses from BusyBoxe''s sed. So > I just named the new sed package to sed-gnu. In doing this I can get the > advance use of gnu sed that Shorewall needs and the BusyBox sed that > Openwrt needs. I have then modified all of the shell scripts and > libraries to use the sed-gnu binary instead. > > I know this may not be the best fix, but at least it would give some > flexibility for some of the embedded systems.Let''s see if we can''t find ''the best fix''.> > I am willing to create a diff that would have this already done and I > could submit this if the Shorewall crew would accept it. > > I don''t like to have to maintain my own versions of this type of thing, > it makes upgrading and management a nightmare. > > Please let me know what everyone thinks.Adding such a change would compound the felony. I would much prefer to get a patch that changes the failing ''sed'' command so that it works with both GNU sed and your version of BusyBox ''sed''. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
On Sun, Feb 10, 2008 at 08:57:28AM -0800, Tom Eastep wrote:> > I am willing to create a diff that would have this already done and I > > could submit this if the Shorewall crew would accept it. > > > > I don''t like to have to maintain my own versions of this type of thing, > > it makes upgrading and management a nightmare. > > > > Please let me know what everyone thinks. > > Adding such a change would compound the felony. I would much prefer to get a > patch that changes the failing ''sed'' command so that it works with both GNU > sed and your version of BusyBox ''sed''.(To add the obvious...) So please tell us how it''s actually breaking. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Andrew Suffield wrote:> On Sun, Feb 10, 2008 at 08:57:28AM -0800, Tom Eastep wrote: > >>> I am willing to create a diff that would have this already done and I >>> could submit this if the Shorewall crew would accept it. >>> >>> I don''t like to have to maintain my own versions of this type of thing, >>> it makes upgrading and management a nightmare. >>> >>> Please let me know what everyone thinks. >>> >> Adding such a change would compound the felony. I would much prefer to get a >> patch that changes the failing ''sed'' command so that it works with both GNU >> sed and your version of BusyBox ''sed''. >> > > (To add the obvious...) > > So please tell us how it''s actually breaking. >Here is the output from where it begins with the errors Validating /etc/shorewall/tcdevices... sed: bad option in substitution expression sed: bad option in substitution expression Validating /etc/shorewall/tcclasses... Compiling /etc/shorewall/tcdevices... sed: bad option in substitution expression sh: 0: unknown operand TC Device eth0.1 9950kbit 350kbit defined. Compiling /etc/shorewall/tcclasses... sed: bad option in substitution expression /usr/share/shorewall-shell/compiler: line 1: syntax error: 5*/10 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Philip S. Hempel wrote:> >> So please tell us how it''s actually breaking. >> > > Here is the output from where it begins with the errors > > Validating /etc/shorewall/tcdevices... > sed: bad option in substitution expression > sed: bad option in substitution expression > Validating /etc/shorewall/tcclasses... > Compiling /etc/shorewall/tcdevices... > sed: bad option in substitution expression > sh: 0: unknown operand > TC Device eth0.1 9950kbit 350kbit defined. > Compiling /etc/shorewall/tcclasses... > sed: bad option in substitution expression > /usr/share/shorewall-shell/compiler: line 1: syntax error: 5*/10The attached patch to lib.tc should cure this. It restores the childish substitution from 3.4. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Tom Eastep wrote:> Philip S. Hempel wrote: > >>> So please tell us how it''s actually breaking. >>> >>> >> Here is the output from where it begins with the errors >> >> Validating /etc/shorewall/tcdevices... >> sed: bad option in substitution expression >> sed: bad option in substitution expression >> Validating /etc/shorewall/tcclasses... >> Compiling /etc/shorewall/tcdevices... >> sed: bad option in substitution expression >> sh: 0: unknown operand >> TC Device eth0.1 9950kbit 350kbit defined. >> Compiling /etc/shorewall/tcclasses... >> sed: bad option in substitution expression >> /usr/share/shorewall-shell/compiler: line 1: syntax error: 5*/10 >> > > The attached patch to lib.tc should cure this. It restores the childish > substitution from 3.4. > > -Tom > > >OK, that fixes things. I did not see any errors in the output. Thanks ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/