home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 August
/
Silicon_Graphics_812-0542-002.iso
/
dist
/
license_eoe.idb
/
usr
/
bin
/
licensemgr.setup.z
/
licensemgr.setup
Wrap
Text File
|
1996-08-03
|
3KB
|
117 lines
#!/sbin/sh
#
# Update netscape and zmail config files for LicenseManager
#
# This script installs both the old mime type, enterlicense, and the
# new mime type licensemgr to support 5.3 users who may be expecting
# the enterlicense type, and >5.3 users who are expecting
# the licensemgr type.
#
# If the host already contains the updates, this script does nothing.
#
ZMAILTYPES=/usr/lib/Zmail/attach.types
MAILCAP=/usr/local/lib/netscape/mailcap
MIMETYPE=/usr/local/lib/netscape/mime.types
#
# Check for zmail file and update if needed
#
if test -f ${ZMAILTYPES}
then
if grep "enterlicense" ${ZMAILTYPES} >/dev/null
then
# do nothing, enterlicense is already in the file
true
else
# need to catenate enterlicense info into attach.types
cat >> ${ZMAILTYPES} <<end-of-zmail-attach-type
TYPE application/x-enterlicense "/usr/etc/enterlicense '%s' &" "/usr/etc/enterlicense '%s' &" "EnterLicense"
MIME2IRIX application/x-enterlicense EnterLicenseDocument
IRIX2MIME EnterLicenseDocument application/x-enterlicense
end-of-zmail-attach-type
fi
if grep "licensemgr" ${ZMAILTYPES} >/dev/null
then
# do nothing, licensemgr is already in the file
true
else
# need to catenate licensemgr info into attach.types
cat >> ${ZMAILTYPES} <<end-of-zmail-attach-type
TYPE application/x-licensemgr "/usr/etc/LicenseManager '%s' &" "/usr/etc/LicenseManager '%s' &" "LicenseManager"
MIME2IRIX application/x-licensemgr LicenseMgrDocument
IRIX2MIME LicenseMgrDocument application/x-licensemgr
end-of-zmail-attach-type
fi
else
echo
echo "MediaMail is not installed on this system. Automatic installation"
echo "of nodelock licenses in Media Mail will not be supported."
echo
fi
#
# If the netscape files do not exists, warn the user and write the information
# to the files.
#
if test ! -f $MAILCAP
then
echo
echo "The Netscape Web Browser is not installed. Please add the following"
echo "information to the mailcap file for your Web browser."
echo ' application/x-enterlicense; /usr/etc/enterlicense %s; \'
echo ' application/x-licensemgr; /usr/etc/LicenseManager %s; \'
echo ' description="Software License Installation"'
echo
else
if grep "application/x-enterlicense" $MAILCAP >/dev/null
then
true
else
echo 'application/x-enterlicense; /usr/etc/enterlicense %s; \' >> $MAILCAP
echo ' description="Software License Installation"' >> $MAILCAP
fi
if grep "application/x-licensemgr" $MAILCAP >/dev/null
then
true
else
echo 'application/x-licensemgr; /usr/etc/LicenseManager %s; \' >> $MAILCAP
echo ' description="Software License Installation"' >> $MAILCAP
fi
fi
if test ! -f $MIMETYPE
then
echo
echo "The Netscape Web Browser is not installed. Please add the following"
echo "information to the mime.types file for your Web browser."
echo ' type=application/x-enterlicense exts=lic'
echo ' type=application/x-licensemgr exts=licmgr'
echo
else
if grep "application/x-enterlicense" $MIMETYPE >/dev/null
then
true
else
echo 'type=application/x-enterlicense exts=lic' >> $MIMETYPE
fi
if grep "application/x-licensemgr" $MIMETYPE >/dev/null
then
true
else
echo 'type=application/x-licensemgr exts=licmgr' >> $MIMETYPE
fi
fi
exit 0