132 |
if [ ! -z "$kmp" ]; then |
if [ ! -z "$kmp" ]; then |
133 |
cat <<EOF |
cat <<EOF |
134 |
modules=( \$(rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$') ) |
modules=( \$(rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$') ) |
135 |
if [ -x "/sbin/weak-modules" ]; then |
if [[ ! -z "\$modules" && -x "/sbin/weak-modules" ]]; then |
136 |
printf '%s\n' "\${modules[@]}" \ |
printf '%s\n' "\${modules[@]}" \ |
137 |
| /sbin/weak-modules --add-modules |
| /sbin/weak-modules --add-modules |
138 |
fi |
fi |
139 |
%preun -n kmod-${kmod_name}${dashvariant} |
%preun -n kmod-${kmod_name}${dashvariant} |
140 |
rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$' \ |
rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$' \ |
141 |
> /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules |
> /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules || : |
142 |
EOF |
EOF |
143 |
|
|
144 |
fi |
fi |
153 |
cat <<EOF |
cat <<EOF |
154 |
modules=( \$(cat /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules) ) |
modules=( \$(cat /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules) ) |
155 |
#rm /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules |
#rm /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules |
156 |
if [ -x "/sbin/weak-modules" ]; then |
if [[ ! -z "\$modules" && -x "/sbin/weak-modules" ]]; then |
157 |
printf '%s\n' "\${modules[@]}" \ |
printf '%s\n' "\${modules[@]}" \ |
158 |
| /sbin/weak-modules --remove-modules |
| /sbin/weak-modules --remove-modules |
159 |
fi |
fi |