Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > main-release > by-pkgid > 957291c4eebae3023b17cde80e61270c > scriptlet

kernel-source-stripped-2.6.17.5mdv-1-1mdv2007.0.x86_64.rpm

POSTIN

/bin/sh
cd /usr/src
rm -f linux
ln -snf linux-2.6.17-5mdv linux
/sbin/service kheader start 2>/dev/null >/dev/null || :
# we need to create /build only when there is a source tree.

for i in /lib/modules/2.6.17-5mdv*; do
	if [ -d $i ]; then
		ln -sf /usr/src/linux-2.6.17-5mdv $i/build
		ln -sf /usr/src/linux-2.6.17-5mdv $i/source
	fi
done

POSTUN

/bin/sh
if [ -L /usr/src/linux ]; then 
    if [ -L /usr/src/linux -a `ls -l /usr/src/linux 2>/dev/null| awk '{ print $11 }'` = "linux-2.6.17-5mdv" ]; then
	[ $1 = 0 ] && rm -f /usr/src/linux
    fi
fi
# we need to delete <modules>/{build,source} at unsinstall
for i in /lib/modules/2.6.17-5mdv*/{build,source}; do
	if [ -L $i ]; then
		rm -f $i
	fi
done
exit 0

###
### file lists
###