# net.lo won't start -- not enough args I'M DESPERATE [SOLVED]

## Bionut

OK, i've had it... I'm finally giving in and posting.

A while back, I updated to the newer baselayout (1.11.13) in a vain attempt to get my wifi card to work.

The wifi card is no longer the problem, in fact it is the least of my problems. Now on trying to start net.lo i get the following:

```
* ERROR: not enough args.

 * Usage: net.lo { start|stop|restart|pause|zap }

 *        net.lo without arguments for full help

```

I have edited /etc/conf.d/net.lo and symlinked net.eth0 as required and all sorts of things I was told to do faithfully.

Now I just need a clue, any clue as to why this is happening to me... as you can imagine it makes life without Samba, cups, mysql.......... very,very, very hard indeed.

Please help...

and of course, if any info about the configs I've in place would help... I'll post 'em, TaLast edited by Bionut on Tue Aug 02, 2005 4:41 am; edited 1 time in total

----------

## jamapii

You don't need a /etc/conf.d/net.lo, i think there's nothing to configure with a loopback device. Only /etc/conf.d/{net,wireless,net.ethX} are useful.

Of course, start net.lo with "/etc/init.d/net.lo start". If this doesn't work, something's broken, reemerge baselayout and do "dispatch-conf", it is mostly "use-new" for /etc/init.d/... and "zap-new" for /etc/conf.d/...

----------

## Bionut

Thanks for looking into it but no show... the error message I posted was the output after I tried /etc/init.d/net.lo start (or restart or starting any deamon that has it as a dependancy such as cupsd or netmount.

I have re-emerged the baselayout several times and still no show.  As you quite rightly stated, something is broken.

From what I understand, init.d/net.lo only has the usual start-restart-zap etc arguments and other bits are optional flags.

Just as additional info that maybe relevant to my potential saviours. The interfaces eth0 and eth1 are fully functional when called with #dhcpcd eth*.  I get a net address and all that.  Naturally as net.lo doesn't start, havoc reigns in the rest of my system.

any comments, doesn't matter what would be appreciated... I've probably missed something fundamentally stupid (as I'm renowned for that)

Thanks again,

Ben

----------

## UberLord

```
emerge --oneshot baselayout

etc-update
```

Ensure that all files are updated.

If that fails to fix, please post how you are starting net.lo

----------

## Bionut

thank you UberLord, no it hasn't worked I'm afraid...

The above error first appears in start-up when the computer is switched to the boot run-level and I think the hostname service is the first to call it and output the error.  To be perfectly honest it doesn't matter which service because it is closely folowed by cupsd, mysql, and others.

When I start it manually (or should I say, when I try to) I have done so in a shell in X, su prior to entering X, and even if I login as root after boot. I do so as below:

```
root elputer # /etc/init.d/net.lo start
```

After which the computer returns the error message in my first post

The same happens if i restart another service such as cupsd:

```
 #/etc/init.d/cupsd restart

* Stopping cups ...

* ERROR: not enough args.

* Usage: net.lo {start|stop|restart...}

*             net.lo without arguments for full help

* Starting cupsd ... ... [ok]

```

Anyway, if it helps the cause any,I'm running a UDEV system with vanilla kernel 2.6.11.10

Thanks again...

----------

## UberLord

```
emerge --oneshot --noconfmem baselayout

etc-update
```

Try that

----------

## Bionut

no luck with that either... Same message.  is there anything in any of the script that might be calling on a device node or the like silently that might not be working due to the devfs to udev process ? (maybe  :Confused:  )

----------

## Bionut

Sorry to do this to all the new posts but this is driving me nuts...

Bump  :Confused: 

----------

## robdd

I have no clue as to what's going on, but you did say you were desperate  :Smile: 

Have you tried going back to an earlier version of baselayout ?  If the jolly wireless card won't work anyway then what have you go to lose ?  If you can't remember what old version you had I'm running 2.6.11-gentoo-r11 with baselayout-1.11.12-r4 and it's working fine.

I sympathise - nothing more frustrating than trying to get something new working, and something basic breaks.  Good Luck !

----------

## m_sqrd

Try to edit you /etc/init.d/net.lo file and add

NET_DEBUG=1

right above the line where it test for it ie

if [[ -n ${NET_DEBUG} ]]; then

then run your /etc/init.d/net.lo start

and show us the out put.

----------

## Bionut

Thanks m_sqrd and everyone else...

Well I edited /etc/init.d/net.lo as suggested and it gives the output below:

```
elputer ben # /etc/init.d/net.lo start

 * Caching service dependencies ...                                       [ ok ]

++ devnull=/dev/stderr

++ MODULES_DIR=/lib/rcscripts/net.modules.d

++ source /lib/rcscripts/net.modules.d/helpers.d/functions

+ opts='start stop restart pause zap '

+ shift

+ [[ 0 -lt 1 ]]

+ eerror 'ERROR: not enough args.'

+ [[ no == yes ]]

+ [[ yes != yes ]]

+ echo -e ' * ERROR: not enough args.'

 * ERROR: not enough args.

+ esyslog daemon.err rc-scripts 'ERROR: not enough args.'

+ local pri=

+ local tag=

+ '[' -x /usr/bin/logger ']'

+ pri=daemon.err

+ tag=rc-scripts

+ shift 2

+ [[ -z ERROR: not enough args. ]]

+ /usr/bin/logger -p daemon.err -t rc-scripts -- 'ERROR: not enough args.'

+ return 0

+ LAST_E_CMD=eerror

+ return 0

+ usage start stop restart pause zap

+ local 'IFS=|'

+ myline='Usage: net.lo { start|stop|restart|pause|zap '

+ echo

+ eerror 'Usage: net.lo { start|stop|restart|pause|zap }'

+ [[ no == yes ]]

+ [[ yes != yes ]]

+ echo -e ' * Usage: net.lo { start|stop|restart|pause|zap }'

 * Usage: net.lo { start|stop|restart|pause|zap }

+ esyslog daemon.err rc-scripts 'Usage: net.lo { start|stop|restart|pause|zap }'

+ local pri=

+ local tag=

+ '[' -x /usr/bin/logger ']'

+ pri=daemon.err

+ tag=rc-scripts

+ shift 2

+ [[ -z Usage: net.lo { start|stop|restart|pause|zap } ]]

+ /usr/bin/logger -p daemon.err -t rc-scripts -- 'Usage: net.lo { start|stop|restart|pause|zap }'

+ return 0

+ LAST_E_CMD=eerror

+ return 0

+ eerror '       net.lo without arguments for full help'

+ [[ no == yes ]]

+ [[ yes != yes ]]

+ echo -e ' *        net.lo without arguments for full help'

 *        net.lo without arguments for full help

+ esyslog daemon.err rc-scripts '       net.lo without arguments for full help'

+ local pri=

+ local tag=

+ '[' -x /usr/bin/logger ']'

+ pri=daemon.err

+ tag=rc-scripts

+ shift 2

+ [[ -z        net.lo without arguments for full help ]]

+ /usr/bin/logger -p daemon.err -t rc-scripts -- '       net.lo without arguments for full help'

+ return 0

+ LAST_E_CMD=eerror

+ return 0

+ exit 1

```

Well that's it... must say, I can't make head nor tails of it but that's not saying much.

If anyone else can, that'd be great.

----------

## UberLord

 *Bionut wrote:*   

> 
> 
> ```
> 
> ++ source /lib/rcscripts/net.modules.d/helpers.d/functions
> ...

 

Please tell me that /lib/rcscripts/net.modules.d/helpers.d/functions exists and is readable

----------

## Bionut

ok /lib/rcscripts/net.modules.d/helpers.d/functions is there and when I opened it with vim, there was a fair bit of stuff in it that looked like it was supposed to be there.

----------

## Bionut

As you wrote the lib UberLord, its probably not necessary to post its contents but I'll just put the commented lines of each function below to see if its all there

```

# int netmask2cidr(char *netmask)

#

# Returns the CIDR of a given netmask

.

.

.

# char* netmask2cidr(int cidr)

#

# Returns the netmask of a given CIDR

.

.

.

# char* interface_device(char *iface)

#

# Gets the base device of the interface

# Can handle eth0:1 and eth0.1

# Which returns eth0 in this case

.

.

.

# char* interface_type(char* iface)

#

# Returns the base type of the interface

# eth, ippp, etc

.

.

.

# char* interface_variable(char *iface)

#

# Returns a bash variable name based on the interface

.

.

.

# bool clean_pidfile(char *file)

#

# Removes the given pidfile if the process is not running

# Returns 1 if the process is still running otherwise 0

.

.

.

# bool process_finished(int pid, char* cmd)

#

# We wait for 10 seconds until the command ${cmd}

# stops running on the process ${pid}

```

Well that's that... I'm sorry but none of it make sense to me once again. Just a little out of my league... If you ever need help with biochemistry, I'm not too bad at that  :Smile: 

----------

## UberLord

Well, that looks all right - but I really don't have a clue whats wrong :/

----------

## m_sqrd

Bionut

do a /etc/init.d/net.lo foo start and out put that.

----------

## Bionut

m_sqrd, thanks. 

the output of /etc/init.d/net.lo foo start is identical to that I posted above.  :Crying or Very sad:   When you say foo start, did you mean too substitute foo with something relevant or to do what I did which was literally write 

```
/etc/init.d/net.lo foo start
```

?

and thanks UberLord for giving it a go too.

----------

## m_sqrd

no I was look to see if it was eating the arg line and it is else you'd have got some other error

ok try /sbin/runscript net.lo it should output some stuff like

<stuff removed> -------

Configuration files:

    There are two files which will be sourced for possible configuration by

    the rc-scripts.  They are (sourced from top to bottom):

    /etc/conf.d/net.lo

    /etc/rc.conf

Management:

    Services are added and removed via the 'rc-update' tool.  Running it without

    arguments should give sufficient help.

----------

## Bionut

yes, m_sqrd, it does give that output-- the same output as it did when I manually run /etc/init.d/net.lo without start or restart or whatever...

What now?

----------

## m_sqrd

hmm...

 the only other thing I can think of right now is  edit the /sbin/runscript.sh and add the line

echo "running $0 $@" right after the # $Header$

and run /etc/init.d/net.lo start 

and keep moving the echo line down through that script tell you find where the args are lost.

I have to log off for now if I have time and can get back on tonight .. I'll look some more..

----------

## jamapii

Could a syntax or other error in the configuration files cause this? A shift command?

You can temporarily put an 

```
echo "$@"
```

 in /etc/rc.conf , this should output "/etc/init.d/net.lo start"

----------

## Bionut

Firstly, THANK YOU all for your help on this one.  I got some valuable clues on how to solve it.  First to put you all out of your misery (cause I know this post has been keeping you up at nights just like it has me);

The simple answer was I had not removed /etc/conf.d/net and that contained conflicting info or something... anyway its removal resulted in a functional system.

after looking around the bugs list, I found someone had an unrelated issue but nevertheless recieved this reply  *Quote:*   

> ------ Additional Comment #5 From  Martin Schlemmer  2005-07-21 01:46 PDT -------
> 
> Edit /sbin/runscript.sh, add an ' -x' to the end of the first line
> 
> (#!/bin/bash), and then start/stop something that fails, and attach the output here.
> ...

 

in response as a method of debug.

Well I ran it and saw that runscript.sh was sourcing /etc/conf.d/net.lo and /etc/conf.d/net as well as the obligatory rc.conf

I had essentially the same info in both the config files but a couple of syntax variations I'd tried between old baselayout paradigms and new ones.  Anyway I just thought I'd write the above little summary to put this method of debug out there a bit more prominantly because with it I could see the errors in my ways and can now; print, network, administer, share, mysql ....etc to my hearts content.  Something not possible to do for the last week or so.

So once again thanks all for the help.

Ben

----------

