Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-19 Thread Chmouel Boudjnah

On Tuesdayen den 18 December 2001 19.03, Sebastian Dransfeld wrote:

> [[ is a bash internal, while [ is a symlink to test.

FYI not for zsh :

chmou@no|~| which [
[: shell built-in command
chmou@no|~| 

-- 
http://www.linux-mandrake.com/en/club/




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-18 Thread Oden Eriksson

On Tuesdayen den 18 December 2001 19.03, Sebastian Dransfeld wrote:
> On 18 Dec 2001, Chmouel Boudjnah wrote:
> > Oden Eriksson <[EMAIL PROTECTED]> writes:
> > > So what's the difference?
> >
> > chmou@giants|~| aa=
> > chmou@giants|~| [[ $aa != 0 ]] && echo bar
> > bar
> > chmou@giants|~| [ $aa != 0 ] && echo bar
> > [: !=: unary operator expected
> > chmou@giants|~|
> >
> > and more and more (can't list here)
>
> [[ is a bash internal, while [ is a symlink to test.

Aha!, mystery's solved (I think), thanks!

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Oden Eriksson, Deserve-IT Networks, Jokkmokk, Sweden.
| Mandrake Linux release 8.2 (Cooker) for i586
| Current uptime with kernel 2.4.16-10mdksmp: 13 hours 41 minutes
| cpu0 @ 799.53 bm, fan 4245 rpm, temp +26°C
| cpu1 @ 801.17 bm, fan 4591 rpm, temp +27.0°C




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-18 Thread Sebastian Dransfeld

On 18 Dec 2001, Chmouel Boudjnah wrote:

> Oden Eriksson <[EMAIL PROTECTED]> writes:
>
> > So what's the difference?
>
> chmou@giants|~| aa=
> chmou@giants|~| [[ $aa != 0 ]] && echo bar
> bar
> chmou@giants|~| [ $aa != 0 ] && echo bar
> [: !=: unary operator expected
> chmou@giants|~|
>
> and more and more (can't list here)

[[ is a bash internal, while [ is a symlink to test.

seb





Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-18 Thread Oden Eriksson

On Tuesdayen den 18 December 2001 11.41, Chmouel Boudjnah wrote:
> Oden Eriksson <[EMAIL PROTECTED]> writes:
> > Hmm..., could this be implemented in "ntsysv" to? Sort of the way
> > linuxconf handles this?
>
> http://www.linux-mandrake.com/cgi-bin/cvsweb.cgi/SPECS/chkconfig/chkco
>nfig-1.2.12-adddelxinetd.patch>

Great! You rule!

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Oden Eriksson, Deserve-IT Networks, Jokkmokk, Sweden.
| Mandrake Linux release 8.2 (Cooker) for i586
| Current uptime with kernel 2.4.16-10mdksmp: 8 hours 3 minutes
| cpu0 @ 799.53 bm, fan 4192 rpm, temp +26°C
| cpu1 @ 801.17 bm, fan 4560 rpm, temp +27.5°C




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-18 Thread Chmouel Boudjnah

Oden Eriksson <[EMAIL PROTECTED]> writes:

> Hmm, your mailserver seems to stutter...

yes :p

-- 
http://www.linux-mandrake.com/en/club/




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-18 Thread Chmouel Boudjnah

Oden Eriksson <[EMAIL PROTECTED]> writes:

> Hmm..., could this be implemented in "ntsysv" to? Sort of the way linuxconf 
> handles this?

http://www.linux-mandrake.com/cgi-bin/cvsweb.cgi/SPECS/chkconfig/chkconfig-1.2.12-adddelxinetd.patch>

--- chkconfig-1.2.12/chkconfig.c.chmou  Sat Sep 23 14:35:50 2000
+++ chkconfig-1.2.12/chkconfig.cSat Sep 23 14:37:20 2000
@@ -62,7 +62,11 @@
readServiceError(rc, name);
return 1;
 }
-if (s.type == TYPE_XINETD) return 0;
+if (s.type == TYPE_XINETD) {
+setXinetdService(s, 0);
+system("/sbin/service xinetd reload >/dev/null 2>&1");
+return 0;
+}
 
 for (level = 0; level < 7; level++) {
if (!findServiceEntries(name, level, &globres)) {
@@ -86,7 +90,11 @@
return 1;
 }

-if (s.type == TYPE_XINETD) return 0;
+if (s.type == TYPE_XINETD) {
+setXinetdService(s, 1);
+system("/sbin/service xinetd reload >/dev/null 2>&1");
+return 0;
+}
 
 for (i = 0; i < 7; i++) {
if (!isConfigured(name, i)) {


-- 
http://www.linux-mandrake.com/en/club/




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-18 Thread Chmouel Boudjnah

Oden Eriksson <[EMAIL PROTECTED]> writes:

> So what's the difference?

chmou@giants|~| aa=
chmou@giants|~| [[ $aa != 0 ]] && echo bar
bar
chmou@giants|~| [ $aa != 0 ] && echo bar
[: !=: unary operator expected
chmou@giants|~| 

and more and more (can't list here)

-- 
http://www.linux-mandrake.com/en/club/




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-17 Thread Oden Eriksson

On Mondayen den 17 December 2001 19.00, Fabrice FACORAT wrote:
> le lun 17-12-2001 à 18:30, Oden Eriksson a écrit :
> > On Fridayen den 14 December 2001 15.48, Chmouel Boudjnah wrote:
> > > Oden Eriksson <[EMAIL PROTECTED]> writes:
> > > > On Fridayen den 14 December 2001 13.24, Sebastian Dransfeld wrote:
> > > > > On Fri, 14 Dec 2001, Salane wrote:
> > > > > > So it still doesnt work
> > > > >
> > > > > But 'service' is used to start standalone programs. To start
> > > > > xinetd-programs you must activate them and restart xinetd.
> > > >
> > > > Exactly, this is not very obvious for the newbie. There should be
> > > > something reloading (x)inetd when the affected services are
> > > > activated/inactivated.
> > > >
> > > > Otherwise you will continue to see this kind of questions.
> > >
> > > ok i checked that for service in cvs :
> >
> > [snip]
> >
> > Hmm..., could this be implemented in "ntsysv" to? Sort of the way
> > linuxconf handles this?
> >
> > BTW. What does all these double "[[" and "]]" do?, it's new to me.
>
> man bash
>
> if [[ ! -f ${servicedir}/${serv} ]];then
>
> if file ${servicedir}/${serv} doesn't exist then

Yes, but I usally only do:

if [ ! -f ${servicedir}/${serv} ];then

So what's the difference?

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Oden Eriksson, Deserve-IT Networks, Jokkmokk, Sweden.
| Mandrake Linux release 8.1 (Vitamin) for i586
| Current uptime with kernel 2.4.8-26mdksmp:1:37
| cpu0 @ 799.53 bm, fan 4218 rpm, temp +29.0°C
| cpu1 @ 801.17 bm, fan 4530 rpm, temp +32°C




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-17 Thread Fabrice FACORAT

le lun 17-12-2001 à 18:30, Oden Eriksson a écrit :
> On Fridayen den 14 December 2001 15.48, Chmouel Boudjnah wrote:
> > Oden Eriksson <[EMAIL PROTECTED]> writes:
> > > On Fridayen den 14 December 2001 13.24, Sebastian Dransfeld wrote:
> > > > On Fri, 14 Dec 2001, Salane wrote:
> > > > > So it still doesnt work
> > > >
> > > > But 'service' is used to start standalone programs. To start
> > > > xinetd-programs you must activate them and restart xinetd.
> > >
> > > Exactly, this is not very obvious for the newbie. There should be
> > > something reloading (x)inetd when the affected services are
> > > activated/inactivated.
> > >
> > > Otherwise you will continue to see this kind of questions.
> >
> > ok i checked that for service in cvs :
> 
> [snip]
> 
> Hmm..., could this be implemented in "ntsysv" to? Sort of the way linuxconf 
> handles this?
> 
> BTW. What does all these double "[[" and "]]" do?, it's new to me.

man bash

if [[ ! -f ${servicedir}/${serv} ]];then

if file ${servicedir}/${serv} doesn't exist then

-- 
http://perso.wanadoo.fr/linux_wizard/index.html 
-
If you want your spouse to listen and pay strict attention to every
word you say, talk in your sleep.





Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-17 Thread Oden Eriksson

On Fridayen den 14 December 2001 15.48, Chmouel Boudjnah wrote:
> Oden Eriksson <[EMAIL PROTECTED]> writes:
> > On Fridayen den 14 December 2001 13.24, Sebastian Dransfeld wrote:
> > > On Fri, 14 Dec 2001, Salane wrote:
> > > > So it still doesnt work
> > >
> > > But 'service' is used to start standalone programs. To start
> > > xinetd-programs you must activate them and restart xinetd.
> >
> > Exactly, this is not very obvious for the newbie. There should be
> > something reloading (x)inetd when the affected services are
> > activated/inactivated.
> >
> > Otherwise you will continue to see this kind of questions.
>
> ok i checked that for service in cvs :

Hmm, your mailserver seems to stutter...

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Oden Eriksson, Deserve-IT Networks, Jokkmokk, Sweden.
| Mandrake Linux release 8.1 (Vitamin) for i586
| Current uptime with kernel 2.4.8-26mdksmp:1:20
| cpu0 @ 799.53 bm, fan 4192 rpm, temp +30.0°C
| cpu1 @ 801.17 bm, fan 4500 rpm, temp +32°C




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-17 Thread Oden Eriksson

On Fridayen den 14 December 2001 15.48, Chmouel Boudjnah wrote:
> Oden Eriksson <[EMAIL PROTECTED]> writes:
> > On Fridayen den 14 December 2001 13.24, Sebastian Dransfeld wrote:
> > > On Fri, 14 Dec 2001, Salane wrote:
> > > > So it still doesnt work
> > >
> > > But 'service' is used to start standalone programs. To start
> > > xinetd-programs you must activate them and restart xinetd.
> >
> > Exactly, this is not very obvious for the newbie. There should be
> > something reloading (x)inetd when the affected services are
> > activated/inactivated.
> >
> > Otherwise you will continue to see this kind of questions.
>
> ok i checked that for service in cvs :

[snip]

Hmm..., could this be implemented in "ntsysv" to? Sort of the way linuxconf 
handles this?

BTW. What does all these double "[[" and "]]" do?, it's new to me.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Oden Eriksson, Deserve-IT Networks, Jokkmokk, Sweden.
| Mandrake Linux release 8.1 (Vitamin) for i586
| Current uptime with kernel 2.4.8-26mdksmp:47min
| cpu0 @ 799.53 bm, fan 4245 rpm, temp +31.0°C
| cpu1 @ 801.17 bm, fan 4560 rpm, temp +30°C




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-17 Thread Chmouel Boudjnah

Oden Eriksson <[EMAIL PROTECTED]> writes:

> On Fridayen den 14 December 2001 13.24, Sebastian Dransfeld wrote:
> > On Fri, 14 Dec 2001, Salane wrote:
> > > So it still doesnt work
> >
> > But 'service' is used to start standalone programs. To start
> > xinetd-programs you must activate them and restart xinetd.
> 
> Exactly, this is not very obvious for the newbie. There should be something 
> reloading (x)inetd when the affected services are activated/inactivated.
> 
> Otherwise you will continue to see this kind of questions.

ok i checked that for service in cvs :


--- service.~1.8.~  Mon Dec 10 10:56:58 2001
+++ service Fri Dec 14 15:46:46 2001
@@ -11,9 +11,9 @@
 opt=
 fullrestart=
 statusall=
-debug=
 
 servicedir=/etc/init.d
+xinetddir=/etc/xinetd.d
 
 version=$(echo '$Id: service,v 1.8 2001/12/10 09:56:58 chmouel Exp $'|cut -d" " -f3)
 basename=${0##*/}
@@ -31,6 +31,29 @@
 EOF
 exit 1
 }
+function check_if_inetd() {
+local serv=$1
+if [[ ! -f ${servicedir}/${serv} ]];then
+   if [[ -f ${xinetddir}/${serv} ]];then
+   if egrep -q ".*disable.*yes.*" ${xinetddir}/${serv};then 
+   echo "$serv is a xinetd service and it is disabled"
+   echo "to activate it do the following command:"
+   echo -e "chkconfig ${serv} on"
+   service=
+   return
+   fi
+   service=xinetd
+   [[ $options = "start" ]] && options=reload
+   if [[ $options != reload ]] && [[ -z $fullrestart ]];then
+   echo "There is no such option for an xinetd services"
+   echo "You can only use the start option to reload a xinetd services"
+   service=
+   fi
+   echo "${serv} is a xinetd service"
+   fi
+fi
+return
+}
 
 while [[ $1 = --* ]] || [[ $1 = -* ]];do
 opt=$1
@@ -38,7 +61,7 @@
 case $opt in
--full-restart|-f) fullrestart=yes;;
--status-all|-s) statusall=yes;;
-   --debug|-d) debug="/bin/bash -x";;
+   --debug|-d) set -x ; debug="/bin/bash -x";;
--help|-h) usage;;
*) echo "Unknow option $opt"; usage;
 esac
@@ -67,6 +90,7 @@
 fi
 
 if [[ -n $fullrestart ]];then
+check_if_inetd "$service"
 cd "$servicedir"
 if [[ -f ./$service ]];then
$debug ./$service stop
@@ -81,10 +105,12 @@
 
 [[ -z $options ]] && { echo  "I need an action"; usage ;}
 
-if [ -x $servicedir/$service ]; then
+check_if_inetd "$service" ; [[ -z $service ]] && exit 1
+
+if [[ -x $servicedir/$service ]]; then
 $debug $servicedir/$service $options
 exit $?
 else
-echo "Cannot find $servicedir/$service"
+echo "Cannot find $service service"
 usage
 fi


-- 
http://www.linux-mandrake.com/en/club/




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-17 Thread Daouda LO

Salane <[EMAIL PROTECTED]> writes:

> service swat restart
> Cannot find /etc/init.d/swat
> Usage: service -[fshv] SERVICE ARGUMENTS
> -f|--full-restart:  Do a fullrestart of the service.
> -s|--status-all:Print a status of all services.
> -d|--debug: Launch with debug.
> -h|--help:  This help.
> -v|--version:   Print version.

service xinetd restart.

Works well here (tm)




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-14 Thread Alexander Skwar

So sprach »Oden Eriksson« am 2001-12-14 um 14:04:19 +0100 :
> Exactly, this is not very obvious for the newbie. There should be something 
> reloading (x)inetd when the affected services are activated/inactivated.

chkconfig restarts xinetd if a change to a xinetd service is done.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 7 days 4 hours 21 minutes




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-14 Thread Oden Eriksson

On Fridayen den 14 December 2001 13.24, Sebastian Dransfeld wrote:
> On Fri, 14 Dec 2001, Salane wrote:
> > So it still doesnt work
>
> But 'service' is used to start standalone programs. To start
> xinetd-programs you must activate them and restart xinetd.

Exactly, this is not very obvious for the newbie. There should be something 
reloading (x)inetd when the affected services are activated/inactivated.

Otherwise you will continue to see this kind of questions.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Oden Eriksson, Deserve-IT Networks, Jokkmokk, Sweden.
| Mandrake Linux release 8.2 (Cooker) for i586
| Current uptime with kernel 2.4.16-7mdksmp: 2 hours 11 minutes
| cpu0 @ 814.28 bm, fan 4470 rpm, temp +29°C
| cpu1 @ 815.92 bm, fan 4440 rpm, temp +29.5°C




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-14 Thread Sebastian Dransfeld

On Fri, 14 Dec 2001, Salane wrote:

> So it still doesnt work

But 'service' is used to start standalone programs. To start
xinetd-programs you must activate them and restart xinetd.

seb





Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-14 Thread Salane

So it still doesnt work


On Friday 14 December 2001 06:21 am, you wrote:
> On Thu, 13 Dec 2001, Salane wrote:
> > service swat restart
> > Cannot find /etc/init.d/swat
>
> swat is a xinetd service.
>
> seb

-- 
Thyme's Law:
Everything goes wrong at once.




Re: [Cooker] no SWAT cannot connect to http://localhost:901/

2001-12-14 Thread Sebastian Dransfeld

On Thu, 13 Dec 2001, Salane wrote:

> service swat restart
> Cannot find /etc/init.d/swat

swat is a xinetd service.

seb