# '../10-openrc-status' exited with error status 1

## alexcortes

On shutdown networkmanager return this message when the services stoping:

```
nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/10-openrc-status' exited with error status 1
```

10-openrc-status:

```
#!/bin/sh

# Copyright (c) 2012 Alexandre Rostovtsev

# Released under the 2-clause BSD license.

# Ensures that the NetworkManager OpenRC service is marked as started and

# providing net only when it has a successful connection.

# Ensure rc-service is in PATH

PATH="${PATH}:/sbin:/usr/sbin"

# Exit if the NetworkManager OpenRC service is not running

rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0

# Call rc-service in background mode so that the start/stop functions update

# NetworkManager service status to started or inactive instead of actually

# starting or stopping the daemon

export IN_BACKGROUND=YES

case "$2" in

    up) nm-online -t 0 && exec rc-service NetworkManager start ;;

    down) nm-online -t 0 || exec rc-service NetworkManager stop ;;

    pre-sleep) exec rc-service NetworkManager stop ;;

esac
```

NetworkManager seems working as well, but I don't know why it show this message only during the shutdown.

Thanks!!!

----------

## Rexilion

Are you using systemd maybe? The only thing I could think of is openrc not doing something properly.

Try running the command:

 *Quote:*   

> exec rc-service NetworkManager stop

 

As I suspect that is the failing culprit. You can check it's return status (the error 1), by doing

 *Quote:*   

> echo $?

 

Directly after the previous command. If the last command prints a '1', then you have likely found the failing command. Then we could look further.

----------

## poncho

net-misc/networkmanager-0.9.4.0-r2 hangs on 10-openrc-status

https://bugs.gentoo.org/show_bug.cgi?id=417283

workaround in above bug fixed this issue for me...

----------

## alexcortes

 *Rexilion wrote:*   

> Are you using systemd maybe? The only thing I could think of is openrc not doing something properly.
> 
> Try running the command:
> 
>  *Quote:*   exec rc-service NetworkManager stop 
> ...

 

I'm not using systemd...

The 'echo $?' command return '1'.

 *Quote:*   

> net-misc/networkmanager-0.9.4.0-r2 hangs on 10-openrc-status
> 
> https://bugs.gentoo.org/show_bug.cgi?id=417283
> 
> workaround in above bug fixed this issue for me...

 

Not fixed here.   :Sad: 

Thanks!!!

----------

## Rexilion

The bug references to a change in behaviour of nm-applet. It has nothing to do with a failing command when shutting down.

Could you please post the output of:

 *Quote:*   

> strace rc-service NetworkManager stop

 

Please? (strace is in the 'strace' package)

----------

## alexcortes

Hi,

My HDD die, I will back when I install in the new HD.   :Crying or Very sad: 

Thanks!

----------

## Rexilion

Bad things happen, we will wait   :Smile: 

----------

## alexcortes

Hello!

I'm back!!!   :Very Happy: 

I need to make 1 correction: that message is not being showed when NetworkManager stoping, but during d-bus stoping.

NetworkManager:

 *Quote:*   

> rc-service NetworkManager stop
> 
>  * Stopping sshd ...                                                                                                                                                                        [ ok ]
> 
>  * Stopping squid ...
> ...

 

 *Quote:*   

> echo $?
> 
> 130

 

D-Bus:

 *Quote:*   

> rc-service dbus stop
> 
> * Stopping cupsd ...
> 
> * Stopping squid ...
> ...

 

 *Quote:*   

> echo $?
> 
> 0

 

Thanks again!   :Smile: 

----------

## alexcortes

Hello!

I'm back!!!   :Very Happy: 

I need to make 1 correction: that message is not being showed when NetworkManager stoping, but during d-bus stoping.

NetworkManager:

 *Quote:*   

> rc-service NetworkManager stop
> 
>  * Stopping sshd ...                                                                                                                                                                        [ ok ]
> 
>  * Stopping squid ...
> ...

 

 *Quote:*   

> echo $?
> 
> 130

 

D-Bus:

 *Quote:*   

> rc-service dbus stop
> 
> * Stopping cupsd ...
> 
> * Stopping squid ...
> ...

 

 *Quote:*   

> echo $?
> 
> 0

 

Thanks again!   :Smile: 

----------

## Rexilion

Could you be more specific, I don't see it in your quotes above..

----------

## alexcortes

I take a shot of my display and then I can take all message. But I'm not understanding why it's only happens during shutdown.

If I simply stop the service, no error message appear...

```
* Stopping D-BUS system messagebus ...

nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/10-openrc-status' exited with error status 1

nm-dispatcher.action: Disconnected from the system bus, exiting.
```

I'm thinking about to leave that error message...

----------

