SLES11SP3 add ping command/script

Dear all,

I have made a simple script ping01

#!/bin/bash ping -c 100000 192.0.10.242

I want to execute this script at Linux boot.
I have put this ping01 file into /etc/init.d but it doesn’t run at boot.

When I run this script from console:
#./ping01

it works.

Regards
GN

[QUOTE=gregn;29223]Dear all,

I have made a simple script ping01

#!/bin/bash ping -c 100000 192.0.10.242

I want to execute this script at Linux boot.
I have put this ping01 file into /etc/init.d but it doesn’t run at boot.

When I run this script from console:
#./ping01

it works.

Regards
GN[/QUOTE]

Take a look here, also look at the comments on that page with other examples: https://www.suse.com/communities/conversations/easy-running-scripts-boot-and-shutdown/

Thomas

ln -s /etc/init.d/ping01 /etc/init.d/rc3.d/ping01 /etc/init.d/rc5.d/ping01

After you symlink to your script from /etc/init.d/rc3.d and
/etc/init.d/rc5.d, could you explain a bit more about why you want to do this?


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

Hi GN,

[QUOTE=gregn;29223]Dear all,

I have made a simple script ping01

#!/bin/bash ping -c 100000 192.0.10.242

I want to execute this script at Linux boot.
I have put this ping01 file into /etc/init.d but it doesn’t run at boot.

When I run this script from console:
#./ping01

it works.

Regards
GN[/QUOTE]

actually, no script is run from /etc/init.d… at least not by simply being there. Those LSB scripts are typically invoked via their S* (for “run at startup”) and K* (for “kill on shutdown”) symlinks in /etc/init.d/rc*.d.

If you just want to invoke a script on startup, have a look at calling it from /etc/init.d/boot.local, to avoid warnings/errors for not having LSB-conforming headers in your script.

If you share some more details of what you’re trying to achieve, we might be able to assist with other side-effects to consider.

Regards,
Jens