You are not logged in.

#1 2007-10-28 19:44:35

polle
Member
Registered: 2007-10-28
Posts: 3

commands at startup

Hi

I just installed arch (gentoo user for years) and afer a while I got everything working. (at least I think so)
Just one thing, where do I put commands that need to be excecuted at boot?
thanks

Offline

#2 2007-10-28 19:54:15

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: commands at startup

Depends on what it is exactly that you want to accomplish, but the standard place would be the /etc/rc.local script.

Offline

#3 2007-10-28 20:05:38

sveinemann
Member
Registered: 2007-09-30
Posts: 108

Re: commands at startup

Are you thinking about startup within gnome/kde? Or before GDM?

Offline

#4 2007-10-29 14:32:38

polle
Member
Registered: 2007-10-28
Posts: 3

Re: commands at startup

before slim is ok, (I use xfce4 and slim as displaymanager)
in fact I just want to use the comaand ntpdate at boot (you can run it as a daemon I know, but just once ntpdate at boot is enough for me)

Offline

#5 2007-10-29 14:39:52

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: commands at startup

insert "sudo ntpdate LOCAL_SERVER" into rc.local.

Where LOCAL_SERVER is the server from your country. I guess you have to add your user to the network group as well.

Offline

#6 2007-10-29 16:23:43

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: commands at startup

Ashren wrote:

insert "sudo ntpdate LOCAL_SERVER" into rc.local.

Where LOCAL_SERVER is the server from your country. I guess you have to add your user to the network group as well.

Sudo isn't needed, rc.local is sourced as root.

Last edited by Ramses de Norre (2007-10-29 16:23:57)

Offline

#7 2007-10-29 17:45:21

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: commands at startup

pacman -S ntp, then you could put 'ntpdate' in the DAEMONS array in /etc/rc.conf and edit /etc/conf.d/ntp-client.conf to your liking. But yes, normally that rc.local advice is the right way.


1000

Offline

#8 2007-10-30 11:28:17

polle
Member
Registered: 2007-10-28
Posts: 3

Re: commands at startup

thanks, indeed I did as suggested:
ntpdate LOCAL_SERVER
in /etc/rc.local and that just works,

thnaks

Offline

Board footer

Powered by FluxBB