Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[VOS FICHIERS SVP] dhcp (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
legabier
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 231

PostPosted: Fri Oct 06, 2006 10:32 am    Post subject: [VOS FICHIERS SVP] dhcp (résolu) Reply with quote

SVP, j'ai besoin de /etc/init.d/dhcp (sans le d) et /etc/conf.d/dhcp (sans le d)

En réponse à ce message, dans un [ code ]....

Merci
_________________
Néophyte ou novice, telle est la question...


Last edited by legabier on Fri Oct 06, 2006 12:13 pm; edited 3 times in total
Back to top
View user's profile Send private message
UB|K
l33t
l33t


Joined: 27 May 2004
Posts: 786
Location: Villeurbanne, France

PostPosted: Fri Oct 06, 2006 10:46 am    Post subject: Reply with quote

allez, je suis bonne poire:
/etc/conf.d/dhcpd:
Code:
# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd

# If you require more than one instance of dhcpd you can create symbolic
# links to dhcpd service like so
#   cd /etc/init.d
#   ln -s dhcpd dhcpd.foo
#   cd ../conf.d
#   cp dhcpd dhcpd.foo
# Now you can edit dhcpd.foo and specify a different configuration file.
# You'll also need to specify a pidfile in that dhcpd.conf file.
# See the pid-file-name option in the dhcpd.conf man page for details.

# If you wish to run dhcpd in a chroot, uncomment the following line
# DHCPD_CHROOT="/chroot/dhcp"

# Then run emerge dhcp --config
# All file paths below are relative to the chroot.
# You can specify a different chroot directory but MAKE SURE it's empty.

# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"

# Configure which interface or interfaces to for dhcpd to listen on.
# List all interfaces space separated. If this is not specified then
# we listen on all interfaces.
# DHCPD_IFACE=""

# Insert any other dhcpd options - see the man page for a full list.
# DHCPD_OPTS=""

/etc/init.d/dhcpd:
Code:
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.3 2006/05/11 14:58:34 uberlord Exp $

DHCPD_CONF="/etc/dhcp/dhcpd.conf"

# Work out our cffile if it's on our DHCPD_OPTS
if [[ " ${DHCPD_OPTS} " == *" -cf "* ]]; then
        DHCPD_CONF=" ${DHCPD_OPTS} "
        DHCPD_CONF="${DHCPD_CONF##* -cf }"
        DHCPD_CONF="${DHCPD_CONF%% *}"

        # Now we have the cffile, we can remove it from our options
        DHCPD_OPTS="${DHCPD_OPTS//-cf/}"
        DHCPD_OPTS="${DHCPD_OPTS//${DHCPD_CONF}/}"
fi

depend() {
        need net
        use logger dns
}

get_var() {
        sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \
                "${DHCPD_CHROOT}/${DHCPD_CONF}"
}

start() {
        if [[ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ]] ; then
                eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist"
                return 1
        fi

        local leasefile="$(get_var lease-file-name)"
        leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}"
        if [[ ! -f ${leasefile} ]] ; then
                ebegin "Creating ${leasefile}"
                touch "${leasefile}"
                chown dhcp:dhcp "${leasefile}"
                eend $? || return 1
        fi

        # Setup LD_PRELOAD so name resolution works in our chroot.
        if [[ -n ${DHCPD_CHROOT} ]] ; then
            LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so"
            export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so"
        fi

        local pidfile="$(get_var pid-file-name)"
        pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}"

        ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}"
        start-stop-daemon --start --exec /usr/sbin/dhcpd \
                --pidfile "${DHCPD_CHROOT}/${pidfile}" \
                -- ${DHCPD_OPTS} -q -pf "${pidfile}" -cf "${DHCPD_CONF}" \
                -user dhcp -group dhcp \
                ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE}
        eend $? \
            && save_options chroot "${DHCPD_CHROOT}" \
            && save_options pidfile "${pidfile}"
}

stop() {
        local chroot="$(get_options chroot)"

        ebegin "Stopping ${chroot:+chrooted }${SVCNAME}"
        start-stop-daemon --stop --exec /usr/sbin/dhcpd \
            --pidfile "${chroot}/$(get_options pidfile)"
        eend $?
}

pour info, si tu as perdu ces fichiers, re-emerger dhcp suffit à les retrouver :wink:
_________________
Reality is that which, when you stop believing in it, doesn't go away.
Back to top
View user's profile Send private message
legabier
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 231

PostPosted: Fri Oct 06, 2006 10:48 am    Post subject: Reply with quote

Ce n'est pas ceux là, c'est vraiment dhcp (sans le d)
rc-status me dit qu'il est (celui du init.d) dans le runlevel mais il n'est pas présent sur le disque. Les dhcpd sont là.

Je ne peux pas réemerge: pas de dhcp = pas de net.
_________________
Néophyte ou novice, telle est la question...
Back to top
View user's profile Send private message
Apsforps
Guru
Guru


Joined: 27 Sep 2004
Posts: 520
Location: Belgium

PostPosted: Fri Oct 06, 2006 10:57 am    Post subject: Reply with quote

euh, ce ne serait pas plutôt un net.eth0 qu'il te faudrait dans le init.d ? Ya pas de dhcp normalement, si?
_________________
Apsforps
Back to top
View user's profile Send private message
man in the hill
Veteran
Veteran


Joined: 15 Dec 2005
Posts: 1552
Location: Madinina

PostPosted: Fri Oct 06, 2006 10:58 am    Post subject: Reply with quote

Salut,


J'ai bien ces fichiers sur mon serveur mais il n'a pas été mis à jour depuis bien longtemps ... Mais cela t'intéresse je te file quand même !


@ +
_________________
Get Up and Go !
Back to top
View user's profile Send private message
UB|K
l33t
l33t


Joined: 27 May 2004
Posts: 786
Location: Villeurbanne, France

PostPosted: Fri Oct 06, 2006 11:00 am    Post subject: Reply with quote

legabier wrote:
Ce n'est pas ceux là, c'est vraiment dhcp (sans le d)
rc-status me dit qu'il est (celui du init.d) dans le runlevel mais il n'est pas présent sur le disque. Les dhcpd sont là.

Je ne peux pas réemerge: pas de dhcp = pas de net.

autant pour moi...
bah j'ai pas de fichiers dhcp sur mon sysème donc je peux pas t'aider.
mais peut-être qu'un simple "dhcpd eth0" peut te permettre de retouver ta connexion juste le temps de l'emerge...
_________________
Reality is that which, when you stop believing in it, doesn't go away.
Back to top
View user's profile Send private message
legabier
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 231

PostPosted: Fri Oct 06, 2006 12:03 pm    Post subject: Reply with quote

Effectivement, je n'ai pas/plus besoin de ces fichiers.

Je vous réfère au fil d'origine (la raison pour laquelle je demandais ces fichiers): https://forums.gentoo.org/viewtopic-p-3627396.html#3627396
_________________
Néophyte ou novice, telle est la question...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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