View | Details | Raw Unified | Return to bug 32166
Collapse All | Expand All

(-)udevd-final.old (+28 lines)
Lines 22-27 Link Here
22
# Source function library.
22
# Source function library.
23
. /etc/init.d/functions
23
. /etc/init.d/functions
24
24
25
BUG_29282=no
26
27
SourceIfNotEmpty /etc/sysconfig/udev-rule-generator
28
25
LOCKFILE=/run/lock/subsys/udevd-final
29
LOCKFILE=/run/lock/subsys/udevd-final
26
RETVAL=0
30
RETVAL=0
27
31
Lines 39-44 Link Here
39
	action "Handling remaining udev events:" udevadm trigger \
43
	action "Handling remaining udev events:" udevadm trigger \
40
		&& touch "$LOCKFILE"
44
		&& touch "$LOCKFILE"
41
	RETVAL=$?
45
	RETVAL=$?
46
47
	MODULES=`ls -dl /sys/class/net/*/device/driver | sed "s|.*/||" | uniq`
48
	is_yes "$BUG_29282" && \
49
		{ # https://bugzilla.altlinux.org/29282#c34
50
			for MODULE in $MODULES; do
51
				rmmod $MODULE && action "reloading $MODULE module for triggering udev" modprobe $MODULE
52
				RETVAL=$[RETVAL+$?]
53
			done
54
			sleep 2
55
			udevadm control --reload-rules
56
		}
57
	[ -f /etc/udev/rules.d/70-persistent-net.rules ] && \
58
		{
59
			MODIFIED=`stat -c %Y /etc/udev/rules.d/70-persistent-net.rules`
60
			CURRIENT=`date +%s`
61
			if [ $[$CURRIENT-$MODIFIED] -lt 300 ]; then
62
				for MODULE in $MODULES; do
63
					rmmod $MODULE && action "reloading $MODULE module for renaming interfaces" modprobe $MODULE
64
					RETVAL=$[RETVAL+$?]
65
				done
66
				sleep 1
67
			fi
68
		}
69
42
	return $RETVAL
70
	return $RETVAL
43
}
71
}
44
72

Return to bug 32166