inittab - SCO

This is a discussion on inittab - SCO ; Hi, I'm trying to get a process running from boot up. I have added an entry in the initab file, but it is not working.I can manually start the process. Any ideas: atmc:234:bootwait:/u/atmc/atmc.rc Thanking you in advanced...... Pedds ; )...

+ Reply to Thread
Results 1 to 4 of 4

Thread: inittab

  1. inittab

    Hi,
    I'm trying to get a process running from boot up.
    I have added an entry in the initab file, but it is not working.I can
    manually start the process. Any ideas:
    atmc:234:bootwait:/u/atmc/atmc.rc

    Thanking you in advanced......

    Pedds ; )



  2. Re: inittab


    ----- Original Message -----
    From: "connect"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Sunday, February 12, 2006 5:52 PM
    Subject: inittab


    > Hi,
    > I'm trying to get a process running from boot up.
    > I have added an entry in the initab file, but it is not working.I can
    > manually start the process. Any ideas:
    > atmc:234:bootwait:/u/atmc/atmc.rc
    >
    > Thanking you in advanced......
    >
    > Pedds ; )


    1) Is /u a seperate filesystem? It won't be mounted yet at that point.

    2) You have to pay unusual attention to things like PATH and TERM in a
    script run from other contexts besides normal fully booted up multi-user,
    logged in.
    Like inittab, rc scripts, cron jobs, cgi scripts...

    3) inittab gets overwritten from templates by some os commands, things you
    add to it will dissapear unless you add them to the source/template files
    too.
    >From the top of inittab itself:

    # /etc/inittab on 286/386 processors is built by Installable
    # Drivers (ID) each time the kernel is rebuilt. /etc/inittab is replaced
    # by /etc/conf/cf.d/init.base appended with the component files in the
    # /etc/conf/init.d directory by the /etc/conf/bin/idmkinit command.

    4) ## this is the important one ###
    Do you _really_ need it to be run that early? from inittab?
    Generally speaking, inittab isn't meant to run random stuff you want to run
    at boot.
    Instead put a script in /etc/rc2.d and give it a name that starts with
    uppercase S and a number and it will get run during bootup.
    atmc.rc already sounds like it's an rc script, it's probably intended to be
    copied somewhere into /etc/rc*
    so do this: cp /u/atmc/atmc.rc /etc/rc2.d/S99atmc
    Why copy and not symlink? because the /u drive might still not be mounted
    yet at the time that tries to run.
    So if you copy it, at least the script, if not the app, will exist while
    booting up (instead of a broken link), and you can add stuff to the script
    to make it test if /u/atmc exists, sleep 1, in a loop until /u/atmc exists,
    then runs the app.

    Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


  3. Re: inittab

    A good way to get processes to start on boot up is to put a script in
    to the /etc/rc2.d directory. All the startup scripts are in here and
    will be run when the system starts up.
    For example:
    S85tcp does a tcp start and P86scologin does the scologin start and
    S99vncserver starts up vncservices. You could create a S99atmc and put
    a few lines in it to start up your service/process.
    I notice that on my system tcp is in the inittab and also has this
    startup script, same as scologin.
    Hoping that helps!


  4. Re: inittab

    Thanks Brian and Tonagon,
    You have solved the problem. I copied the script into the /etc/rc2.d
    directory and it worked like a charm.

    Much appreciated - this will be noted down.


    Have a great day!


    Cheers
    Pedds : )
    "Brian K. White" wrote in message
    news:026f01c6302f$1d188460$6a00000a@venti...
    >
    > ----- Original Message -----
    > From: "connect"
    > Newsgroups: comp.unix.sco.misc
    > To:
    > Sent: Sunday, February 12, 2006 5:52 PM
    > Subject: inittab
    >
    >
    >> Hi,
    >> I'm trying to get a process running from boot up.
    >> I have added an entry in the initab file, but it is not working.I can
    >> manually start the process. Any ideas:
    >> atmc:234:bootwait:/u/atmc/atmc.rc
    >>
    >> Thanking you in advanced......
    >>
    >> Pedds ; )

    >
    > 1) Is /u a seperate filesystem? It won't be mounted yet at that point.
    >
    > 2) You have to pay unusual attention to things like PATH and TERM in a
    > script run from other contexts besides normal fully booted up multi-user,
    > logged in.
    > Like inittab, rc scripts, cron jobs, cgi scripts...
    >
    > 3) inittab gets overwritten from templates by some os commands, things you
    > add to it will dissapear unless you add them to the source/template files
    > too.
    >>From the top of inittab itself:

    > # /etc/inittab on 286/386 processors is built by Installable
    > # Drivers (ID) each time the kernel is rebuilt. /etc/inittab is replaced
    > # by /etc/conf/cf.d/init.base appended with the component files in the
    > # /etc/conf/init.d directory by the /etc/conf/bin/idmkinit command.
    >
    > 4) ## this is the important one ###
    > Do you _really_ need it to be run that early? from inittab?
    > Generally speaking, inittab isn't meant to run random stuff you want to
    > run
    > at boot.
    > Instead put a script in /etc/rc2.d and give it a name that starts with
    > uppercase S and a number and it will get run during bootup.
    > atmc.rc already sounds like it's an rc script, it's probably intended to
    > be
    > copied somewhere into /etc/rc*
    > so do this: cp /u/atmc/atmc.rc /etc/rc2.d/S99atmc
    > Why copy and not symlink? because the /u drive might still not be mounted
    > yet at the time that tries to run.
    > So if you copy it, at least the script, if not the app, will exist while
    > booting up (instead of a broken link), and you can add stuff to the script
    > to make it test if /u/atmc exists, sleep 1, in a loop until /u/atmc
    > exists,
    > then runs the app.
    >
    > Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    > filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
    >




+ Reply to Thread