Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create Sys links to start up scripts RHEL 4



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.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org