My apologies for posting to quickly!!!:)

Given that LOCKFILE needs a path name; the only line that need to be 
change is the one that creats the missing directories in the function 
mutex_on:

[ -d $(dirname $lockf) ] || mkdir -p $(dirname $lockf)

-Matt

On 5 Nov 2015 at 18:50, matt darfeuille wrote:

> Still in function mutex_on:
> 
> Openwrt has the function lock; adding an elif condition in the if 
> statement that check for the lockfile utility(simply changing 
> lockfile to lock):
> ...
> elif qt mywhich lock; then
>             lock -${MUTEX_TIMEOUT} -r1 ${lockf}
>             chmod u+w ${lockf}
>             echo $$ > ${lockf}
>             chmod u-w ${lockf}
> else
> ...
> 
> Seems to be working fine!
> 
> -Matt
> 
> On 5 Nov 2015 at 15:42, matt darfeuille wrote:
> 
> > There is no /etc/os-release file on openwrt and the output of 'uname' 
> > is:
> > root@OpenWrt:~# uname
> > Linux
> > root@OpenWrt:~#
> > 
> > --
> > Assuming that the value of LOCKFILE in shorewall.conf should be set 
> > to something like(path without /lock):
> > LOCKFILE=/var/lib/shorewall
> > 
> > then in lib.common:
> > function mutex_on
> > 
> > The line(} before /lock and not after)
> > lockf=${LOCKFILE:=${VARDIR}/lock}
> > should be changed to
> > lockf=${LOCKFILE:=${VARDIR}}/lock
> > 
> > The line that creat the required directory(ies) should be changed 
> > to(creating required directory if LOCKFILE is set to a path)
> >         [ -d ${LOCKFILE:=${VARDIR}} ] || mkdir -p 
> > ${LOCKFILE:=${VARDIR}}
> > 
> > Also in  function mutex_off:
> > The line(} before /lock and not after)
> > rm -f ${LOCKFILE:=${VARDIR}/lock}
> > should be changed to
> > rm -f ${LOCKFILE:=${VARDIR}}/lock
> > 
> > otherwise you get:
> > ...
> > Copy complete
> > /sbin/shorewall-lite: line 29: can't create /tmp/lib/shorewall/lock: 
> > Is a directory
> > Stopping Shorewall Lite....
> > ...
> > done.
> > Starting Shorewall Lite....
> > Initializing...
> > ...
> > done.
> > rm: '/tmp/lib/shorewall/lock' is a directory
> > System wndr restarted
> > 
> > --
> > If I understand correctly the status -i command should display the 
> > interfaces which have the option "optionel" in the "interfaces" file?
> > If so I do not have any *.status file in my vardir directory even 
> > though I have some interface with the "optional" option.
> > 
> > Is it because of openwrt or am I misunderstanding/missing something?
> > 
> > -Matt
> > 
> > On 4 Nov 2015 at 12:20, Tom Eastep wrote:
> > 
> > > On 11/04/2015 05:33 AM, matt darfeuille wrote:
> > > > Hi Tom, pleaze find attached the shorewallrc file along with 
> > > > init.openwrt.sh and default.openwrt.
> > > > 
> > > > The version of openwrt I am using:
> > > > root@OpenWrt:~# grep -i desc /etc/openwrt_release
> > > > DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer 15.05'
> > > > root@OpenWrt:~#
> > > > 
> > > 
> > > Thanks Matt!
> > > 
> > > Does openwrt include the file /etc/os-release, and if so then what are
> > > its contents. If not, then what is the output of 'uname' on openwrt?
> > > 
> > > Thanks!
> > > 
> > > -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 \________________________________________________
> > > 
> > > 
> > 
> > 
> > 
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Shorewall-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/shorewall-users
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Shorewall-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/shorewall-users



------------------------------------------------------------------------------
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to