Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why does my custom rc.d script hang?

Featured Replies

I'm using the flash/custom/etc/rc.d script method and I have a problem with one of the scripts.

 

My /custom/etc/rc.d folder contains:

 

rc.local_startup
S01_my_script
S02-install_custom_packages
S99-finish

 

S99-finish contains:

 

/boot/unmenu/uu
/boot/bin/cached.sh

 

At the end of the execution of S99-finish the terminal is hung, I can type characters, but there is no command prompt.  Any ideas?

 

???

 

 

The Linux gurus can probably help much better than I can, but I'll start the ball rolling by asking the obvious questions, to determine how far it got before abnormal behavior began.  Can you determine if both UnMENU and cached.sh are successfully running?  Try ps -eaf or UnMENU:SystemInfo:PS Info, and check to see that the appropriate processes are running, with all the correct command line parameters.

 

That sounds like stdin may have been inadvertently redirected to standard input, the keyboard.  Examine both uu and cached.sh for perfect syntax, especially the use of the < and |.

 

Try putting a & in this line of your S99-finish:

 

/boot/unmenu/uu &

 

Purko

 

 

Try putting a & in this line of your S99-finish:

 

/boot/unmenu/uu &

 

Purko

 

Unlikely to be the answer, but you can try.  More likely you do not have a newline at the end of a line, or at the end of the last line, or a syntax error.

 

Joe L.

  • Author

Well, none of that worked... here's the finish file for anyone to examine...  ???

 

Try putting a & in this line of your S99-finish:

 

/boot/unmenu/uu &

 

Purko

 

Unlikely to be the answer, but you can try.  More likely you do not have a newline at the end of a line, or at the end of the last line, or a syntax error.

 

Joe L.

 

try the following mods.

 

#!/bin/bash 
/boot/unmenu/uu &
/boot/bin/cached.sh &
sleep 1
echo "$0: complete"

 

 

And can you also attach /boot/unmenu/uu and /boot/bin/cached.sh.  By the way, the S99-finish you attached contains carriage returns.

Change the /boot/unmenu/uu line in your S99-finish file to  echo "/boot/unmenu/uu" | at now + 1 minute

 

What you are seeing is a problem with the bash shell.. what is happening if I understand it 100% correctly is the following:

 

Your file (S99-finish) is being "triggered" by a line in the rc.local_startup file that pipes your file to the shell for execution.  This causes you file to start a parent process. When you trigger the execution of the uu script on with the line "/boot/unmenu/uu ", you are starting a child process (uu script) from the parent (your S99-finish script).  The uu script contains a command that starts unmenu and that line ends with a "&".  This means put the command into the background and don't look at the status of it any more.  The child process never responds to the parent and you get a deadlock with the parent.

 

here is a link to the thread where I pointed out this problem before:

http://lime-technology.com/forum/index.php?topic=3666.msg34020#msg34020

There is a link on my next post in this thread with an external link to where I was first tipped off of the problem while researching.

 

Cheers,

Matt

Also note depending on how your chached.sh file is written, you may need to echo "/boot/bin/cached.sh" | at now + 1 minute as well.

 

Cheers,

Matt

  • Author

LOTS to try tonight... Thanks !! :o

 

LOTS to try tonight... Thanks !! :o

 

 

Any luck? Did you get things to boot properly?

 

Cheers,

Matt

  • Author

Stuck struggling with a corrupted user profile in Windows...  ::)

Maybe Manyana !!

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.