# [HALF-SOLVED]: Strange error messages.

## ONEEYEMAN

Hi, ALL,

I have very strange error messages during the start of net.lo and net.eth0.

Trying to figure them out I tried to use some echo commands.

Here is what I'm getting:

```

: command not foundne 5: 

: command not foundne 12: 

1

2

 * Starting lo

3

 *   Bringing up lo

 *     127.0.0.1/8                                                                                                                                                            [ ok ]

 *   Adding routes

 *     127.0.0.0/8 ...                                                                                                                                                        [ ok ]

4

```

```

: command not foundne 5: 

: command not foundne 12: 

1

2

 * Starting eth0

3

" does not existe "(wpa_supplicant)

4

```

```

From /etc/init.d/net.lo

# bool start(void)

#

# Start entry point so that we only have one function

# which localises variables and unsets functions

start() {

   echo 1

   declare -r IFACE="${SVCNAME#*.}"

   echo 2

   einfo "Starting ${IFACE}"

   echo 3

   run "${IFACE}" start

   echo 4

}

```

Any idea what is going on? What are those messages about?

I just guessed that the start() function in /etc/init.d/net.lo will be the starting point for those 2 commands: /etc/init.d/net.lo start and /etc/init.d/net.eth0 start. Guess I was wrong?

Thank you.Last edited by ONEEYEMAN on Fri Nov 19, 2010 5:37 am; edited 1 time in total

----------

## lyallp

Use set -x, you should see the problem then.

After all, these scripts are just bash scripts wrapped inside 'runscript'

```
From /etc/init.d/net.lo

# bool start(void)

#

# Start entry point so that we only have one function

# which localises variables and unsets functions

start() {

   set -x

   declare -r IFACE="${SVCNAME#*.}"

   einfo "Starting ${IFACE}"

   run "${IFACE}" start

} 
```

----------

## ONEEYEMAN

Hi,

Here is the /etc/conf.d/net file:

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

#Wireless-tools

#nis_domain_lo="IgorsGentoo"

#modules_eth1=("iwconfig")

#key_ESSID1="[1] s:IgorNetwork key [1] enc open"

#key_ESSID2="[1] aaaa-bbbb-cccc-dd key [1] enc restricted"

#preferred_aps=("ESSID1" "ESSID2")

#Wpa_supplicant

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Db43 -c /etc/wpa_supplicant.conf"

#wpa_timeout_wlan0 = 60

```

And couple of messages from the log when I ran it with "set -x":

```

 [32;01m*[0m Starting lo

 [32;01m*[0m   Bringing up lo

 [32;01m*[0m     127.0.0.1/8

[A[172C  [34;01m[ [32;01mok[34;01m ][0m

 [32;01m*[0m   Adding routes

 [32;01m*[0m     127.0.0.0/8 ...

[A[172C  [34;01m[ [32;01mok[34;01m ][0m

/etc/conf.d/net: line 5: 

: command not found

/etc/conf.d/net: line 12: 

: command not found

+ declare -r IFACE=lo

+ einfo 'Starting lo'

+ einfon 'Starting lo\n'

+ [[ no == \y\e\s ]]

+ [[ yes != \y\e\s ]]

+ echo -ne ' [32;01m*[0m Starting lo\n'

 [32;01m*[0m Starting lo

+ LAST_E_CMD=einfon

+ return 0

+ LAST_E_CMD=einfo

+ return 0

+ run lo start

+ local iface=lo cmd=start r=1 RC_INDENTATION=

+ local starting=true

```

I guess I need to tell that the wpa_supplicant is for use with the "wlan0" interface?

Thank you.

----------

## lyallp

Note the complaints about 12 and 5? 

Those are the blank lines.

I am betting your net file has been edited with a windows like editor, hence, inserted Ctrl-M (Carriage Returns).

Try displaying the file using 'less', it should show the ^M chars, to confirm.

----------

## ONEEYEMAN

Hi,

The problem with net.lo is fixed after removing empty lines completely in nano.

However, the problem with net.eth0 still exists.

I again added "set -x", but here is what I get:

```

+ is_function '(wpa_supplicant)

_depend'

+ [[ -z (wpa_supplicant)

_depend ]]

++ type -t '(wpa_supplicant)

_depend'

+ [[ '' == \f\u\n\c\t\i\o\n ]]

+ ((  i < 5 - 4  ))

+ [[ -e /lib/rcscripts/net/(wpa_supplicant)

.sh ]]

+ eerror 'The module "(wpa_supplicant)

" does not exist'

+ [[ no == \y\e\s ]]

+ [[ yes != \y\e\s ]]

+ echo -e ' [31;01m*[0m     The module "(wpa_supplicant)

" does not exist'

 [31;01m*[0m     The module "(wpa_supplicant)

" does not exist

+ local name=rc-scripts

+ [[ /sbin/runscript.sh != \/\s\b\i\n\/\r\u\n\s\c\r\i\p\t\.\s\h ]]

+ esyslog daemon.err rc-scripts 'The module "(wpa_supplicant)

" does not exist'

+ local pri=

+ local tag=

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

+ pri=daemon.err

+ tag=rc-scripts

+ shift 2

+ [[ -z The module "(wpa_supplicant)

" does not exist ]]

+ /usr/bin/logger -p daemon.err -t rc-scripts -- 'The module "(wpa_supplicant)

" does not exist'

+ return 0

+ LAST_E_CMD=eerror

+ return 0

+ return 1

+ return 1

+ [[ 1 != \0 ]]

+ [[ start == \s\t\a\r\t ]]

+ is_function failup

+ [[ -z failup ]]

++ type -t failup

+ [[ '' == \f\u\n\c\t\i\o\n ]]

+ [[ false == \t\r\u\e ]]

+ return 1

```

I don't understand this. I do have wpa_supplicant installed :confused

```

IgorsGentooOnNetwork bug # emerge -pv wpa_supplicant 

 * Last emerge --sync was 35d 23h 45m 40s ago.

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U ] net-wireless/wpa_supplicant-0.7.2-r3 [0.6.9] USE="readline ssl -dbus -debug -eap-sim -fasteap% -gnutls -madwifi (-ps3) -qt4 -wps (-qt3%)" 1,597 kB

Total: 1 package (1 upgrade), Size of downloads: 1,597 kB

```

Maybe it became broken somehow?

Thank you.

----------

## Hu

 *ONEEYEMAN wrote:*   

> I again added "set -x", but here is what I get:
> 
> ```
> + [[ -e /lib/rcscripts/net/(wpa_supplicant)
> 
> ...

 You do not have the module wpa_supplicant, wrapped by parentheses and a trailing newline, installed.  This is likely more fallout from whatever corrupted your configuration.  Please examine each involved init script and its associated configuration file for any sign of carriage returns, quoted newlines, or other special characters.  Additionally, please think about how you have edited these files in the past.  Whatever text editor you used is either broken or misconfigured.

----------

## lyallp

modules=( "supplicant or whatever" ) is bash form for an array assignment.

It would seem to me that the script is running in something other than bash - maybe 'sh compatibility' mode?

Your first line of the net.lo file should be as follows, lets face it, you have no reason to change it

```
#!/sbin/runscript

# Copyright 2004-2007 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# Contributed by Roy Marples (uberlord@gentoo.org)

# Many thanks to Aron Griffis (agriffis@gentoo.org)

# for help, ideas and patches

#NB: Config is in /etc/conf.d/net

# For pcmcia users. note that pcmcia must be added to the same

# runlevel as the net.* script that needs it.
```

Maybe you need to re-emerge sys-apps/baselayout to get back to a clean starting point.

----------

## ONEEYEMAN

Hi, guys,

2Hu: I didn't use any editors other than the standard "nano" or gedit.

2lyallp: I will try to re-emerge baselayout. Problem is most likely it will be an upgrade...   :Smile: 

This is what will happen:

```

IgorsGentooOnNetwork igor # emerge -pv baselayout

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U ] sys-apps/baselayout-1.12.14-r1 [1.12.11.1] USE="unicode -bootstrap -build -static" 265 kB

Total: 1 package (1 upgrade), Size of downloads: 265 kB

!!! The following installed packages are masked:

- www-plugins/adobe-flash-10.0.45.2 (masked by: package.mask, AdobeFlash-10 license(s))

/usr/portage/profiles/package.mask:

# Tobias Heinlein <keytoaster@gentoo.org> (05 Jul 2010)

# Severe security issues (bug #322855)

A copy of the 'AdobeFlash-10' license is located at 'None'.

For more information, see the MASKED PACKAGES section in the emerge

man page or refer to the Gentoo Handbook.

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

```

And thats what I got:

```

>>> Installing (1 of 1) sys-apps/baselayout-1.12.14-r1

 * Creating directories and .keep files.

 * Some of these might fail if they're read-only mounted

 * filesystems, for example /dev or /proc.  That's okay!

 * Please be sure to update all pending '._cfg*' files in /etc,

 * else things might break at your next reboot!  You can use 'etc-update'

 * to accomplish this:

 * 

 *   # etc-update

 * WARNING: You have older net.* files in /etc/init.d/

 * They need to be converted to symlinks to net.lo.  If you haven't

 * made personal changes to those files, you can update with the

 * following command:

 * 

 *  /bin/ls '/'etc/init.d/net.* | grep -v '/net.lo$' | xargs -n1 ln -sfvn net.lo

 * The default setting for wiping /tmp has been set to 'yes'.

 * Consult /etc/conf.d/bootmisc for more information.

 * Messages for package sys-apps/baselayout-1.12.14-r1:

 * The default setting for wiping /tmp has been set to 'yes'.

 * Consult /etc/conf.d/bootmisc for more information.

>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 22 config files in '/etc' need updating.

 * See the CONFIGURATION FILES section of the emerge

 * man page to learn how to update config files.

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

```

Thank you.

----------

## lyallp

I assume the thank you means that the problem is now solved?

----------

## ONEEYEMAN

lyallp,

I upgraded baselayout, but still have the same error message.

However, I didn't do "etc-update" and I didn't call the command suggested after upgrade.

I will try to run both commands and see what will happen. If I have some problems with either commands, I will come back to this thread.

Thank you.

----------

