Results 1 to 5 of 5

Thread: linux/unix boot script question

  1. #1

    linux/unix boot script question

    Hey folks, its me again. I have a more complicated problem then usual this time. Im trying to write a script for Caldera OpenUnix 8.0 that runs once, reboots the system, and calls another script that runs before the system reaches the user login stage. I was able to do this in linux by editing my /etc/rc5.d directory and putting a symbolic link to a script that i put in /etc/init.d (or was it the other way around?... you know what i mean). When the system rebooted it ran the script and then rebooted again. I need to do the same thing for unix... but i cant figure out how. There is no /etc/fstab and the /etc/init.d does not look similar to linux at all. Anyone have any suggestions? If you need more information just tell me what you need to know and ill gladly post it. Thanks for any help you can provide!!
    --Morphman, constantly baffled newbie scripter

  2. #2

    Re: linux/unix boot script question

    Post as much as you can on the booting process and exactly what you are trying to do. The more info the better

  3. #3

    Re: linux/unix boot script question

    Well, i want to run a script that will reboot the system when it is finished and after the system reboots (but before login) i want to run another script. I want both scripts to be ran only once though. So i think ill have the first script automagically copy the 2nd script into the /etc/init.d directory and make a symbolic link to it in the /etc/rc2.d directory and ill make it like "S94script2" or something like that. Does that sound like it would work and if not... why not? Im going to try it in just *a couple minutes.

    PS: Oh! Another question--how do i output text to the teminal before login? Ive tried echoing text and ive tried redirecting it to standard error output but neither of those seem to reach the terminal prior to login in the boot sequence. I know that my scripts are getting run because if i do a "read blank" command the curser does stop and wait for the user to hit enter before proceeding any further in the boot process. Any ideas? Thanks!

  4. #4

    Re: linux/unix boot script question

    If it is a sSysV relase type boot it sounds like it would work. You could just as easily create /etc/rcscript that has 0 if it needs to run the 1st script and 2 if it needs to run the 2nd script (and the scripts modify the file after they run to set it to what it needs to be).

    IE: BOOT->First Script->sets rcscript to 1->REBOOT->2nd Script->sets rcscript to 0->Text->Login Prompt

    The scripts can be in sysv style and check the file to see if they run.

    /etc/issue and /etc/ (for net login) are usually good places if your Unix flavor has it. It outputs info before login.

  5. #5

    Re: linux/unix boot script question

    Im not sure i follow you on that one... Create an /etc/rcscript? Will that get ran on startup if i use the same naming convention as the other rcx.d directories? Im sorry, im still a newbie here *??? *Thanks for any additional help you can provide!!


    PS: i only knew about that rc.d stuff because of a LOT of trial and error and experimenting... i dont really know how it works all too well. Ive never had a teacher or a class on unix/linux or anything and im trying to learn it as fast as i can so i can make these scripts for the team. *

Similar Threads

  1. SSH in a script question...
    By vwgtiturbo in forum Programming
    Replies: 6
    Last Post: 06-14-2006, 11:49 PM
  2. Question about Unix timestamp and PHP
    By Epsilon in forum General Chat
    Replies: 1
    Last Post: 10-20-2004, 11:19 PM
  3. Alternative boot method for Linux/Win2k dual boot
    By Spot in forum Windows - General Topics
    Replies: 8
    Last Post: 10-04-2002, 06:42 AM
  4. Bash Script question....
    By gfunkmonk in forum Programming
    Replies: 6
    Last Post: 08-26-2002, 09:47 PM
  5. running script automatically on boot up
    By morphman in forum Programming
    Replies: 1
    Last Post: 04-29-2002, 07:53 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts