2 users responded in this post

Subscribe to this post comment rss or trackback url
User Gravatar
Aymeric - 18 janvier 2012 @ 07:15 :

TBC (sur le ce forum) propose une version alternative pour le fixudev :

#! /bin/sh
### BEGIN INIT INFO
# Provides: fixudev
# Required-Start: networking
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: remove fixed relation between MAC address and name of network device (00:15:f2:90:3e:a0 -> eth0)
# Description: remove fixed relation between MAC address and name of network device (00:15:f2:90:3e:a0 -> eth0)
### END INIT INFO

case "$1" in
start)
for interface in `ifconfig -a | grep -e "^eth"|cut -d' ' -f1`; do
MAC=`ifconfig $interface | grep -e "^$interface"|cut -d' ' -f11 | sed s/\:/\\\\\\\\:/g`
for file in `grep -re "^SUBSYSTEM==\"net\".*NAME=\"${interface}\"$" /etc/udev/|sort|uniq|cut -d':' -f1`; do
sed -i -e "/^SUBSYSTEM==\"net\".*NAME=\"${interface}\"$/d" ${file} && \
echo "removed HW address from ${file} (${interface})"
done
done
exit 0
;;
stop)
;;

status)
echo "Nothing here";
;;

restart|reload)
$0 start
;;
*)
echo "Usage: fixudev start"
exit 1
esac
exit 1

User Gravatar
Spout - 7 mai 2012 @ 19:25 :

Merci pour le tuto ça m'a bien aidé, j'ai pu upgrader avec succès 🙂

Leave A Reply

Les commentaires sont modérés. Ainsi le vôtre n'apparaîtra qu'après validation.

 Username (Required)

 Email Address (Remains Private)

 Website (Optional)

*

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>