X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 364CE1A7C7A3 for ; Sat, 15 Oct 2011 16:32:49 +0000 (UTC) Received: by pzk2 with SMTP id 2so5021729pzk.5 for ; Sat, 15 Oct 2011 09:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=4GQ8wiZ3zy48dAZ3rLw133WDVWA3PZxpSjIVJ7ERC+4=; b=d6PQkEK+FQPskzEqpW5dJJIhi/9OQigyqch+x5qCsl+VKhQAnTVF1WW2cCrq2QWHy6 VE47WyQ9a+PyvMXE1TbhiDnyWnZzVwhgkhqVHppdTu7WOLekmkjSY+VJ/eoOKQcW+ggG sjBrH04x50tQNb0r8ySlxP+n8I3+9Dy1LQmQs= Received: by 10.68.16.196 with SMTP id i4mr24839474pbd.97.1318696369108; Sat, 15 Oct 2011 09:32:49 -0700 (PDT) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.143.66.10 with HTTP; Sat, 15 Oct 2011 09:32:29 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Ad=C3=A8lphe_Rafanambinana?= Date: Sat, 15 Oct 2011 19:32:29 +0300 Message-ID: Subject: Re: [alpine-devel] Re: How to run script at startup To: alpine-devel@lists.alpinelinux.org Content-Type: multipart/alternative; boundary=bcaec51dd7d5a5b86d04af58ec3a --bcaec51dd7d5a5b86d04af58ec3a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable After doing some search in Internet, I found that OpenRC/baselayout2 change= d the way how to run a script/program as local service during startup. local service is part of the predefined service in default runlevel. It is responsible for handling the scripts defined in /etc/local.d. The scripts, with suffix .start or .stop, are executed in lexical order (during start or stop of the system, depending on the suffix). That means * /etc/local.d/* is the proper place to put scripts ending with .start that you want executed during the boot. What I did: 1. move my script to /etc/local.d 2. rename it to my_script*.start *3. add local service to start automatically by running the following command: rc-update add local default 4. reboot the machine, and it works. Thank you, On Sat, Oct 15, 2011 at 19:09, Jeremy Thomerson wrote: > It would be great if you could post your answer here so others searching > the list in the future can find it. > > Jeremy Thomerson > -- sent from my "smart" phone, so please excuse spelling, formatting, or > compiler errors > > On Oct 15, 2011 11:25 AM, "Ad=C3=A8lphe Rafanambinana" > wrote: > > Hi all, > Just to let you know, that I get my answer and it works well. > Thank you, > > > On Sat, Oct 15, 2011 at 16:23, Ad=C3=A8lphe Rafanambinana > wrote: > > > > Hi all, > > > > I'... > > -- > Ad=C3=A8lphe Rafanambinana > > > --=20 arafanam --bcaec51dd7d5a5b86d04af58ec3a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable = After doing some search in Internet, I found that OpenRC/baselayout2 change= d the way how to run a script/program as local service during startup.
=
local service is part of the predefined service in default runlevel. It is = responsible for handling the scripts defined in /etc/local.d. The scripts, = with suffix .start or .stop, are executed in lexical order (during start or= stop of the system, depending on the suffix).
That means=C2=A0 /etc/local.d/ is the proper place to put scripts en= ding with .start that you want executed during the boot.

What I did:=

1. move my script to /etc/local.d
2. rename it to my_script.s= tart
3. add local service to start automatically by running the following co= mmand:
=C2=A0 rc-update add local default
4. reboot the machine, and= it works.

Thank you,
On Sat, Oct 15, 2011 at 19:09, Jeremy Thomer= son <jer= emy@thomersonfamily.com> wrote:

It would be great if you could post your answer here so others searching= the list in the future can find it.

Jeremy Thomerson
-- sent from my "smart" phone, so please excuse spelling, formatt= ing, or compiler errors

On Oct 15, 2011 11:25 AM= , "Ad=C3=A8lphe Rafanambinana" <radelphe@gmail.com> wrote:

Hi all,<= br> Just to let you know, that I get my answer and it works well.
Thank you,=


On Sat, Oct 15, 2011 at 16:23, Ad= =C3=A8lphe Rafanambinana <radelphe@gmail.com> wrote:
>
> Hi all,
>
> I= '...

--
Ad=C3=A8lphe Rafanambinana





--
arafanam


--bcaec51dd7d5a5b86d04af58ec3a-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---