shutdown hang from script

shutdown hang from script

Post by Elena Leo » Fri, 12 Nov 1993 08:46:57



Hi,

I have a rather puzzling problem.

Running TWM and X11R5, I have a menu interface written using Wcl - it presents
2 other menus allowing the user to shutdown, or reboot the system.  Each
chosen menu item calls a suid root sh(1) script (dont worry only users in a
certain group can invoke this script), with a parameter -r or -h to reboot or
shutdown.  The actual commands in script and results are:
        1. /usr/etc/reboot
        The window programs are killed, then the system hangs.
        2. /usr/etc/shutdown -h.
        All programs get killed bar PID 1,0 and 2 , then the system goes into
        single user mode

So I then nohuped and put into background the invocation of the script, as well
the actual reboot/shutdown commands.  A reboot now works 9/10 times, and a
shutdown still hangs.  So I changed /usr/etc/shutdown -h to /usr/etc/halt, and
it hangs 1/10 times.

The wierd thing is that if I invoke the script itself from the command line, as
the same user, it works perfectly everytime.

H/W is Sparc 10, SunOs 4.1.3, with 2 Sbus printer cards, with a loadable module
replacing the bpp driver in the kernel.  To this is attached a high speed
Delphax printer.
I also have another same configuration, but without printer cards or module,
the script works prefectly.

Any one have any ideas?
Is this a software or hardware problem? Why? (Help!)

Please mail a reply as I dont read news that often.

Thanks in advance
Elena Leong.
System Administrator
EDIPost Australia Post.

 
 
 

shutdown hang from script

Post by Pete Wa » Fri, 12 Nov 1993 22:39:37


I had the same problem and ended up exec'ing it from an xterm.  My
guess is at somepoint a tty is needed.

        xterm -e 'shutdownscript'

--pete
--

CIS Dept, Ohio State University                 w/ (614) 292-7318
228 Bolz Hall, 2036 Neil Ave.                   h/ (614) 538-0965
Columbus, OH 43210

 
 
 

1. /usr/ucb/shutdown & Shutdown scripts

I have a Solaris 8 system, along with AIX & Linux systems.  I prefer to to
shut the system down with the '/usr/ucb/shutdown' command, because it uses
the same syntax as my other systems.  However, when I run 'shutdown -r
now', which reboots, the system does not execute the runlevel 0 scripts. I
assume this is because it is not running the /etc/rc6 script. However, the
/usr/ucb/ flavor of shutdown is supplied by Sun, so I would _hope_ that it
would simply enter runlevel 6 the same as a /usr/sbin/shutdown -i 6 would.
 Is this a known behavior, or do I have a problem?

2. ATLANTA SYS. ADMIN.

3. Shell script help, shutdown script

4. Trivial Question: Netscape Windows remain 'Windoh!s' Grey in KDE multicolor environment...

5. HELP: Solaris x86 2.5 shutdown hangs

6. Looking for references !!!

7. Mandrake 8.1 shutdown hangs on shutting down interface eth0 (?)

8. Linux for servers?

9. RH 7.1 new install hangs on ctrl-alt-del shutdown

10. Shutdown has hung

11. SOLUTION: graceful shutdown after keyboard lock/also kill hung X session

12. linux hangs when trying to unmount remote filesystems at shutdown

13. shutdown hangs and log entry failure