Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7164367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:03:49+00:00 2026-05-28T14:03:49+00:00

I need a shell scripting way to determine when a remote linux/OSX has completed

  • 0

I need a shell scripting way to determine when a remote linux/OSX has completed all /etc/init.d/* for what ever run levels I have chosen to run in.

since I know I can ssh into a virutal box on my net while it is still booting and run commands like /bin/true or /bin/ps that not everthing is in the state it needs to be.

essentially I need to

while [ ${INIT_STILL_RUNNING_ON_REMOTE_SYSTEN}  ]
do
   sleep 30
done
ssh remoteUser@remoteSystem:command
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:03:50+00:00Added an answer on May 28, 2026 at 2:03 pm

    You could put a script in the run-level you are interested in that is the last thing to run and first thing to shut down that touches a file somewhere to indicate it has run.

    For instance, if you made a script called S99finished and put it in the run-level folder it would run last at that run-level. A corresponding K00finished would run first when shutting down.

    S99finished could look something like:

    #!/bin/bash
    touch ~/.init_finished
    

    and K00finished could look something like:

    #!/bin/bash
    if [ -e ~/.init_finished ]; then
       rm ~/.init_finished
    fi
    

    Then your startup script would poll until ~/.init_finished existed at which point it would go on it’s merry way.

    Note, the startup scripts run as root, so using the home directory tilde will put it in root’s home. That’s probably not ideal for what you’re doing, but illustrates the point. It’s just as easy to put it in /var/log or somewhere else common to poll from. Just remember it has to have read permissions for everybody wherever you stick it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need an Eclipse Plugin run shell scripts under Linux. I have a beautiful
I'm pretty new to shell scripting and linux in general. Basically, I need to
I was playing with shell scripting, when a strange thing happened. I need someone
I need to write a shell script to be scheduled to run daily to
In a shell-script (or Perl) I need a subroutine that returns for all my
I have already learned shell-scripting in Linux environment. However, now I am unable to
I have never done shell scripting before and need some help with a small
I am new to UNIX Shell scripting. I need help in removing leading and
I need to create an ASP page (classic, not ASP.NET) which runs remote shell
I am a newbie with shell scripting so need a few ideas on parsing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.