X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from jeremythomerson.com (unknown [74.117.189.39]) by mail.alpinelinux.org (Postfix) with ESMTP id 8C37E1A7D663 for ; Sat, 15 Oct 2011 16:40:39 +0000 (UTC) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by jeremythomerson.com (Postfix) with ESMTP id 950541C828 for ; Sat, 15 Oct 2011 11:49:52 -0500 (CDT) Received: by vcbfo13 with SMTP id fo13so2241493vcb.13 for ; Sat, 15 Oct 2011 09:40:38 -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.52.175.165 with SMTP id cb5mr4123812vdc.47.1318696838740; Sat, 15 Oct 2011 09:40:38 -0700 (PDT) Reply-To: jeremy@thomersonfamily.com Received: by 10.220.192.194 with HTTP; Sat, 15 Oct 2011 09:40:38 -0700 (PDT) Received: by 10.220.192.194 with HTTP; Sat, 15 Oct 2011 09:40:38 -0700 (PDT) In-Reply-To: References: Date: Sat, 15 Oct 2011 12:40:38 -0400 Message-ID: Subject: Re: [alpine-devel] Re: How to run script at startup From: Jeremy Thomerson To: =?ISO-8859-1?Q?Ad=E8lphe_Rafanambinana?= Cc: alpine-devel@lists.alpinelinux.org Content-Type: multipart/alternative; boundary=bcaec51a8ec6a3ba3904af590837 --bcaec51a8ec6a3ba3904af590837 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Awesome writeup, thanks! Jeremy Thomerson -- sent from my "smart" phone, so please excuse spelling, formatting, or compiler errors On Oct 15, 2011 12:32 PM, "Ad=E8lphe Rafanambinana" wrote: 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 b... --=20 arafanam --bcaec51a8ec6a3ba3904af590837 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Awesome writeup, thanks!

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

On Oct 15, 2011 12:32 PM, "Ad=E8lphe Rafa= nambinana" <radelphe@gmail.co= m> wrote:

After doing some search in Internet, I found that O= penRC/baselayout2 changed the way how to run a script/program as local serv= ice 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=A0 /etc/local.d/ is the proper place to put scripts endin= g 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.star= t
3. add local service to start automatically by running the following co= mmand:
=A0 rc-update add local default
4. reboot the machine, and it= works.

Thank you,



On Sat, Oct 15, 2011 at 19:09, Jeremy Thome= rson <jeremy@thomersonfami= ly.com> wrote:
>
> It would b...

--
arafanam


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