# SLES11SP3 add ping command/script

**URL:** <https://forums.suse.com/t/sles11sp3-add-ping-command-script/27358>\
**Category:** SLES Install-Boot\
**Created:** [August 20, 2015, 1:46pm UTC](https://forums.suse.com/t/sles11sp3-add-ping-command-script/27358 "2015-08-20T13:46:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregn](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@gregn](https://forums.suse.com/u/gregn)\
**Post date:** [August 20, 2015, 1:46pm UTC](https://forums.suse.com/t/sles11sp3-add-ping-command-script/27358/1 "2015-08-20T13:46:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thsundel](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@thsundel](https://forums.suse.com/u/thsundel)\
**Post date:** [August 20, 2015, 2:12pm UTC](https://forums.suse.com/t/sles11sp3-add-ping-command-script/27358/2 "2015-08-20T14:12:00Z")

</div>

[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/](https://www.suse.com/communities/conversations/easy-running-scripts-boot-and-shutdown/)

Thomas

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [August 20, 2015, 4:19pm UTC](https://forums.suse.com/t/sles11sp3-add-ping-command-script/27358/3 "2015-08-20T16:19:42Z")

</div>

```auto
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…

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [August 20, 2015, 4:32pm UTC](https://forums.suse.com/t/sles11sp3-add-ping-command-script/27358/4 "2015-08-20T16:32:25Z")

</div>

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
