Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > media > contrib-release > by-pkgid > 6b1f3e2ae3b83f4763a301c3116f5da0 > scriptlet

configure-thinkpad-0.9-3mdv2007.0.i586.rpm

POSTIN

/bin/sh
if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi 


modulesconf=/etc/modules.conf
if ! `grep -q "/dev/thinkpad" $modulesconf` ; then
        echo "adding entry for /dev/thinkpad/* to your $modulesconf"
        cat >> $modulesconf << EOF
#Added by configure-thinkpad to autoload thinkpad drivers
#path[thinkpad]=/lib/modules/`uname -r`/thinkpad
#options thinkpad enable_smapi=1 enable_superio=1 enable_rtcmosram=1 enable_thinkpadpm=1
alias char-major-10-170 thinkpad
alias /dev/thinkpad thinkpad
alias /dev/thinkpad/thinkpad thinkpad
alias /dev/thinkpad/smapi smapi
alias /dev/thinkpad/superio superio
alias /dev/thinkpad/rtcmosram rtcmosram
alias /dev/thinkpad/thinkpadpm thinkpadpm

EOF
fi

consoleperms=/etc/security/console.perms
if ! `grep -q "/dev/thinkpad" $consoleperms` ; then
        echo "adding entry for /dev/thinkpad/* to your $consoleperms"
        cat >> $consoleperms << EOF

# Added by configure-thinkpad to allow user access to thinkpad devices
<console>  0600 /dev/thinkpad/*   0600 root

EOF
fi

POSTUN

/bin/sh
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi 


# We don't remove the additions to modules.conf and console.perms since
# some other package (ie tpctl) may want them ...