Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
init scripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Greek
View previous topic :: View next topic  
Author Message
ksenos
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 164
Location: Athens, Greece

PostPosted: Sat May 29, 2004 9:41 am    Post subject: init scripts Reply with quote

Γεια και χαρά σε όλους.

Μάγκες έχω μπερδευτεί λίγο με το πως θα έπρεπε να βάζω τα scripts που θα εκτελούνται κατά το boot. Έστω οτι θέλω να βάλω ένα script-ακι, το echo hello, και θέλω να το βάλω στο default runlevel. Πως θα πρέπει να το γράψω? Στο /etc/init.d/ θα πρέπει να το τοποθετήσω ή αλλού? Ευχαριστώ προκαταβολικά.
_________________
Honor guide me...
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Sat May 29, 2004 9:27 pm    Post subject: Reply with quote

Sto /etc/init.d/ pane ola ta scripts. Meta kaneis to gnostw rc-update kai teliose i pothesi.
Back to top
View user's profile Send private message
ksenos
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 164
Location: Athens, Greece

PostPosted: Sun May 30, 2004 9:56 am    Post subject: Reply with quote

Σίγουρα? Αυτό κάνω και εγώ αλλά μου βγάζει errors περί του ότι δεν μπορεί να βρεί dependencies και οτι δεν υπάρχει start() function. Προσθέτω το "echo hello" μέσα σε μια start() αλλα και πάλι μου τα πρήζει με τα dependency errors. Μήπως θέλει τίποτα επιπλέον?
_________________
Honor guide me...
Back to top
View user's profile Send private message
ksenos
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 164
Location: Athens, Greece

PostPosted: Sun May 30, 2004 10:03 am    Post subject: Reply with quote

Και κατι ακόμα :wink: ... Τι διαφορά έχουν τα bsd-style scripts από τα υπόλοιπα?
_________________
Honor guide me...
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Sun May 30, 2004 11:10 am    Post subject: Reply with quote

Exei ena script pou legete depscan.sh (afto tha lisei tis dependencies)
Back to top
View user's profile Send private message
ksenos
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 164
Location: Athens, Greece

PostPosted: Sun May 30, 2004 3:32 pm    Post subject: Reply with quote

Ιδού το sample script:

Code:

depend() {
        after *
}
 
start() {
        ebegin "Hello Script"
        echo hello
        eend
}
 
stop() {
        ebegin "Saluting"
        echo bye bye
        eend
}


Το αποθηκεύω στο /etc/init.d/ και έπειτα τρέχω #rc-update add hello_script default. Τρέχω και το depclean.sh που μου λέει caching dependencies και σταματάει ειρηνικά. Όμως και κατα το boot και κατα το shutdown λαμβάνω το μύνημα. "Could not get dependency info for 'hello_script'!". Μάλιστα κατα το boot το γράφει 3 φορές. Τι δεν κάνω καλα? :roll:
_________________
Honor guide me...
Back to top
View user's profile Send private message
bld
l33t
l33t


Joined: 26 Mar 2003
Posts: 759
Location: Outter Space

PostPosted: Mon May 31, 2004 12:17 pm    Post subject: Reply with quote

cat /etc/conf.d/local.start

Quote:

# /etc/conf.d/local.start:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002
/11/18 19:39:22 azarah Exp $

# This is a good place to load any misc.
# programs on startup ( 1>&2 )

_________________
A happy GNU/Linux user!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Greek All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum