#1 Le 17/11/2012, à 13:46
- skerfi
[résolu] /etc/init.d/networking inexistant
Bonjour,
Je me connecte actuellement avec wicd, je me suis rendu compte que je n'avais pas d'interface lo (elle n'apparaît pas avec ifconfig). J'ai alors voulu me connecter comme je le faisait avant avec ifupdown et qui fonctionnais bien.
J'ai donc remis en place le fichier /etc/network/interfaces que j'avais conservé sauf que je me suis rendu compte que je n'avais plus de fichier /etc/init.d/networking et que je ne pouvais plus me connecté.
Je cherche donc à recréé ces fichier afin de remette ma connexion en place avec ifupdown.
merci d'avance pour les réponses
Dernière modification par skerfi (Le 17/11/2012, à 14:21)
Hors ligne
#2 Le 17/11/2012, à 14:03
- f.x0
Re : [résolu] /etc/init.d/networking inexistant
Bonjour skerfi,
voici le contenu de mon fichier /etc/init.d/networking
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: networking
# Required-Start:
# Required-Stop: $local_fs
# Should-Start: ifupdown
# Should-Stop: ifupdown
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Raise network interfaces.
### END INIT INFOPATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
[ -x /sbin/ifup ] || exit 0
. /lib/lsb/init-functions
# helper function to set the usplash timeout. https://launchpad.net/bugs/21617
usplash_timeout () {
TIMEOUT=$1
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "TIMEOUT $TIMEOUT" || true
fi
}process_options() {
[ -e /etc/network/options ] || return 0
log_warning_msg "/etc/network/options still exists and it will be IGNORED! Read README.Debian of netbase."
}check_network_file_systems() {
[ -e /proc/mounts ] || return 0if [ -e /etc/iscsi/iscsi.initramfs ]; then
log_warning_msg "not deconfiguring network interfaces: iSCSI root is mounted."
exit 0
fiexec 9<&0 < /proc/mounts
while read DEV MTPT FSTYPE REST; do
case $DEV in
/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
log_warning_msg "not deconfiguring network interfaces: network devices still mounted."
exit 0
;;
esac
case $FSTYPE in
nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
log_warning_msg "not deconfiguring network interfaces: network file systems still mounted."
exit 0
;;
esac
done
exec 0<&9 9<&-
}check_network_swap() {
[ -e /proc/swaps ] || return 0exec 9<&0 < /proc/swaps
while read DEV MTPT FSTYPE REST; do
case $DEV in
/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
log_warning_msg "not deconfiguring network interfaces: network swap still mounted."
exit 0
;;
esac
done
exec 0<&9 9<&-
}case "$1" in
start)
/lib/init/upstart-job networking start
;;stop)
check_network_file_systems
check_network_swap# Anything that manages network interfaces *MUST* wait for this event
initctl emit deconfiguring-networkinglog_action_begin_msg "Deconfiguring network interfaces"
if [ "$VERBOSE" != no ]; then
if ifdown -a --exclude=lo; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
else
if ifdown -a --exclude=lo >/dev/null 2>/dev/null; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
fi
;;force-reload|restart)
process_optionslog_warning_msg "Running $0 $1 is deprecated because it may not enable again some interfaces"
log_action_begin_msg "Reconfiguring network interfaces"
ifdown -a --exclude=lo || true
if ifup -a --exclude=lo; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
;;*)
echo "Usage: /etc/init.d/networking {start|stop}"
exit 1
;;
esacexit 0
SOPI
Hors ligne
#3 Le 17/11/2012, à 14:21
- skerfi
Re : [résolu] /etc/init.d/networking inexistant
je viens de retouver une sauvegarde de /etc que j'avais faite il y a quelque temps
j'ai donc remit le même fichier et ça l'aire de vouloir fonctionner, lo est réapparue et je n'est pas constaté d'autre problème
Hors ligne