Create Sys links to start up scripts RHEL 4
stephen goldman
sgoldman at MIT.EDU
Fri Mar 30 13:40:43 EDT 2007
Hello Blu,
Request assistance creating sys links for Matlab license server program.
I have a CASE statement that need to start the program with the user called matlab.
The text file is called "flexnet" it is placed in the /ect/init.d directory below-
The lmboot program which starts the app is located at /usr/local/matlab704/etc/lmboot_TMW
Request direction on how the syslinks should be created and where they should be placed.
!#/bin/bash
#MATLAB FLEXnet Network License Manager Daemon
#
# For boot-time initialization on Linux
#
# Steps: (as root)
#
# If the following links do not exist create them:
#
# ln -s $MATLAB/etc/lmboot /etc/lmboot_TMW
# ln -s $MATLAB/etc/lmdown /etc/lmdown_TMW
#
#THIS is the path to where LMBOOT and LMDOWN are
#
# /usr/local/matlab704/etc
#
#I 'm not sure why I am creating sym links -
#I think the paths should be modified to reflect the true path-
#What directory should the sys links be placed in ?
#
#
#
# Then:
#
# cp $MATLAB/etc/flexnet.boot.linux /etc/rc.d/init.d/flexnet (Red Hat, Fedora
Core)
#
#
#COPY TO /etc/rc.d/init.d ok
#
#
# CRITICAL: replace username argument to the lmboot_TMW commands
# below by a real usename OTHER than root! USER NAME IS matlab
done !
#
# Look in /etc/inittab for the default runlevel. Create
# a link in the rc directory associated with that run
# level. For example if it is 5, then
#
# id:5:initdefault: ok
#
#
#
# cd /etc/rc.d/rc5.d; ln -s ../init.d/flexnet S90flexnet (Red Hat, Fedora C
ore)
#
# lrwxrwxrwx 1 root root 17 Mar 29 19:30 S90flexnet -> ../init.d/flexne
t created the link
#
# case statement
#
case "$1" in
start)5
if [ -f /etc/lmboot_TMW ]; then
/etc/lmboot_TMW -u matlab && echo 'MATLAB_lmgrd'
fi
;;
stop)
if [ -f /etc/lmdown_TMW ]; then
/etc/lmdown_TMW > /dev/null 2>&1
fi
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list