Adding new script in init.d

Hi,

I have included racoon package via make menuconfig and make one image. I have loaded this image in my access point. In access point, under directory /etc/init.d/, I have seen racoon script.

Here I have edited this racoon script according to my requirement. I have run the script by using command /etc/init.d/racoon start. Script is working fine.

My requirement is

  1. How we can add this edited script in build. I mean , what are the changes we need to do before giving "make" for autostart of the racoon process with my new edited script

Thanks,
Durga K

In your buildroot toplevel directory where you execute make in, create the following directory structure:

mkdir -p files/etc/init.d

Then place your modified init script there (e.g. as files/etc/init.d/racoon).

3 Likes

Thanks Jow, I will try this

Hi Jow,

You told me to place the modified script in path /files/etc/init.d. in buildroot directory

This is my script : (only few lines pasted here)

#!/bin/sh /etc/rc.common
#/etc/init.d/racoon - version 27

NAME=racoon
PROG=/usr/sbin/racoon
START=60
STOP=60
. /etc/functions.sh

Here do I need to change the path of functions.sh as well as rc.common accordingly or let it be like this?

Another one question:
After installing racoon package, already one racoon script is present in path /etc/init.d/.
If I place new racoon script in the path files/etc/init.d, which script files it will take while building an image?

Thanks,
Durga K

https://openwrt.org/docs/techref/initscripts

No. (10 characters)

1 Like

Thanks Stangri

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.