Hi,
While waiting for a full rebuild with the new GCC I am looking at my
Shorewall startup problem.
I added "set -x" to /sbin/shorewall and I can see the cause of the error
messages:
+ run_it /var/lib/shorewall/.start start
+ local script
+ local options
+ local version
+ export VARDIR
+ script=/var/lib/shorewall/.start
+ shift
+ get_script_version /var/lib/shorewall/.start
+ local temp
+ local version
+ local ifs
+ local digits
+ /bin/sh /var/lib/shorewall/.start version
+ sed s/-.*//
+ temp=Processing /etc/shorewall/params ...
4.4.13.1
+ [ 0 -ne 0 ]
+ ifs=
+ IFS=.
+ echo Processing /etc/shorewall/params ...
4 4 13 1
+ temp=Processing /etc/shorewall/params ...
4 4 13 1
+ IFS=
+ digits=0
+ printf %02d Processing
sh: Processing: invalid number
etc.
The corresponding code (from /var/lib/shorewall/.start) is:
#
# Get the Shorewall version of the passed script
#
get_script_version() { # $1 = script
local temp
local version
local ifs
local digits
temp=$( $SHOREWALL_SHELL $1 version | sed 's/-.*//' )
if [ $? -ne 0 ]; then
version=0
else
ifs=$IFS
IFS=.
temp=$(echo $temp)
IFS=$ifs
digits=0
for temp in $temp; do
version=${version}$(printf '%02d' $temp)
In summary, the output from "/var/lib/shorewall/.start version" is being
seen as "Processing /etc/shorewall/params ...<CR>4.4.13.1" rather than
simply "4.4.13.1". The "Processing ..." message is being generated by
function progress_message2() in /var/lib/shorewall/.start
A possibly related problem is the contents of /var/log/shorewall.log:
Oct 25 19:23:42 Compiling iptables-restore input for chain
mangle:...
Oct 25 19:23:42 Shorewall configuration compiled
to /var/lib/shorewall/.start
Oct %_d 19:23:42 Processing /etc/shorewall/params ...
Oct %_d 19:23:42 Processing /etc/shorewall/params ...
Note the "%_d". Perhaps it is a coincidence that
"Processing /etc/shorewall/params ..." is in both messages?
The code for process_message2() is:
progress_message2() # $* = Message
{
local timestamp
timestamp=
if [ $VERBOSITY -gt 0 ]; then
[ -n "$g_timestamp" ] && timestamp="$(date +%H:%M:%S) "
echo "${timestamp}$@"
fi
if [ $LOG_VERBOSITY -gt 0 ]; then
timestamp="$(date +'%b %_d %T') "
echo "${timestamp}$@" >> $STARTUP_LOG
fi
}
Is anyone else able to test for this error? I only get it on boot-up.
The code looks OK to me, but I am no sh expert...
davidMbrooke
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
leaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-devel