General :: Init Script Does Not Run At The Shutdown Time
Feb 15, 2010
Im having a bit of a problem with a init script which I wrote to start and stop oracle listener and database. My system is Redhat 5.4 64bit and oracle 10g2 standard database (64). I have created the script and added the script using
chkconfig add orashut, and on the script by chkconfig level 345 orashut on Now I can use service orashut start, stop, restart, and works fine and when the system comes up the database and the listener would come up as planed. But the problem is when I do a reboot or shut down the db or the listener would not shutdown as expected, I placed at K00 values as well in rc0.d and rc6.d to give the priority at the shutdown. Even though all the configurations say this script should run before everything else at the shutdown time this is not working.
When I bring down a certain machine with some nfs mounts using init 0, it hangs forever while trying to bring down the mounts, but if I bring it down using halt -p (which I've read just calls shutdown if I'm in init 3), it comes down in a timely manner. I've also read that shutdown still calls all the rc.d kill scripts just like init 0, so what is actually the difference between them? Is it this:
Quote:
All processes are first notified that the system is going down by the signal SIGTERM?Does init not do that? I'm not trying to directly troubleshoot why NFS makes me hang with init 0 at this point, just wondering why shutdown works whereas init 0 doesn't.
I was reading that if I want to do a one time scheduled command, I should use at, which I've never done, as opposed to cron, which i'm kinda familiar with. But what I want to do is reboot my server at 3am tomorrow and force it to check the file systems with a shutdown -rF. For this do I even need to use "at" or could I just say shutdown -rF 3:00.Will that also know that I mean 3am tomorrow and not say in 3 minutes from now or 3pm?
I have a service that when shutdown requires a username and password. I use `read` in my script to gather this info because I can't have it in the file. When I run the init script by hand it will ask for the username and password and everything shutsdown properly. When I run reboot or halt I get no prompt. get user input in a shutdown process?
I have an init.d script (dahdi-redfone) that works perfectly if you call "service dahdi-redfone stop" but for some reason when I reboot or shutdown it never gets called.Below in the listing of my rc6.d directory
i have installed ubuntu ultimate edition 10.04 in my toshiba c650 recently,however it is taking too long before it startup. 2 when i log off the cursor still remain untill all power have been discharged. what could be the problem
I am using Fedora 15 KDE 32-bit. I am facing a problem while shutdown. It takes unusually long to shut down. It reaches the blue screen with the fedora logo within a few seconds, but it stays on the blue logo screen for 2-3 minutes before shutting down. However, I am facing no problems during startup.
About suspending F15 KDE. It goes into suspend successfully but after switching on after suspend, it just shows an unresponsive black screen.
Is anyone else facing the same problem and has it been solved before? Because I haven't come across many posts regarding F15 KDE.
2 times now our server has randomly shut down. Completely powered off as if the power cable was pulled or something. Both around the same time. 7:30ish. Once was on Friday June 5th, then last night, Wednesday June 10th.
Here is the log from last nights crash/shutdown: Quote: Jun 10 19:23:18 mail avahi-daemon[2564]: Server startup complete. Host name is mail.local. Local service cookie is 1312323680. Jun 10 19:23:18 mail avahi-daemon[2564]: Service "SFTP File Transfer on mail" (/services/sftp-ssh.service) successfully established. Jun 10 19:23:21 mail smartd[2625]: smartd version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen .....
I have Linux debian 7.7.0 i386-amd64 under VBox 4.3.20 and here is the problem:::
When I open the menu from Linux's top-right corner and click SHUT DOWN..., it shows the dialog with choices, and that Linux guest will automatically shutdown after 60 seconds and I need to change that delay value to 3 seconds. Of course I could just re-click Shut Down -button again, but I don't want to do it. Period.
By Googling I found these "instructions" for UBUNTU:
None of this worked on my 13.04 system. In the end I re-compiled gnome-session.
In gsm_shell.c and gsm_logout_dialog.c change #define AUTOMATIC_ACTION_TIMEOUT from 60 to 5
Is in Ubuntu option, that can shutdown computer after time or at defined time? I think: I have turned on my computer and I will need to automatically shutdown computer after 4 hours or at 21.00 pm. Is there option, if computer can automatically turn on at defined time?
I install Opensuse 11.4 on KDE environment then I changed to XFCE. I don't know how to configure for computer auto shutdown after a period of time don't use it.
I have looked high and low for this, but to no avail. I am looking for a script to shutdown my computer when it reaches a specific time (say 10:00). I know about the shutdown command but if I use that I cannot shutdown my computer manually. I would like to be able to shutdown manually AND automatically.
I am currently using a Ubuntu Netbook Remix 9.04 When I press the power button, I see a dialogue box which asks for confirmation and if nothing is confirmed system automatically shuts down in 60 seconds. I want to change this time of 60 seconds to say 30 seconds. Is it possible? Also is there a way to hide that dialogue box...
System time was drifting ahead increasingly for several days time in the end. This is what I did with the clock about 6 hours "in the future":
Quote:
sntp -P no -r pool.ntp.org hwclock --systohc
i.e. I got the (more or less) exact time from the time server and set the hardware / BIOS timer with this value.I renamed "/etc/adjtime" to beginn with a clean slate. During reboot (shut down phase) I noticed a message saying something like: "hwclock set to system time". I checked in the BIOS and there was a new time about one hour early(!). The boot phase then reset the time again, this time several hours forward (usually two to six hours). This is an iterating process, with a net gain of several hours per boot. It is not always whole hours -- like in a time zone error but it involves also minutes. System is set to UTC as affirmed by the "date" command. What could be the cause of this behaviour of the clock / timer?
I cannot locate shutdown log for Linux shutdown to check various activities carried out during shutdown. I can view Startup Log which is availble on console>Applications>System Tools>System Logs.
I have included Shutdown/Startup in dbora, so that Oracle 10gR2 Shutdown/Startup will be automated during OS Shutdown/Startup.
I want to check Shutdown log because Oracle Shutdown was not running, as from $ORACLE_HOME/shutdown.log contains no entries, where as startup log contains latest startup details.
That means here 2 issues are there. One, I want to locate OS Shutdown Log and the other being Why Oracle Shutdown not getting executed.
Shutting down my machine takes a very long time! Not convenient when one want to pack his laptop (I don't dare to when the fan is still blowing).
Upon shutdown, I press 'esc' and see what's happening. The last commands seem to hang. First, shutting down the network interfaces seem to last long than needed (eth0, pan0, wlan0). Sometimes, it stalls also on "networkmanager disconnecting from DBUS" (or something like this ) (which is the very last command executed). Hmm, I will write the exact command down.
I've been dual booting 10.10 with Windows7 for about a month. Today is the first time I've encountered a serious problem.
This morning, nothing functioned properly after trying to open several programs. The computer seemed to be "frozen", although the mouse was working fine.
I decided to reboot, but then encountered an even bigger problem.
It failed to boot and got this message: no init found. try passing init= bootarg
The problem now is that it requires a Live CD session and I keep getting this: GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)
In case it matters, I didn't install 10.10 from an ISO, I just upgraded from 10.04.
Ubuntu 9.10 will not boot! System froze this morning, I restarted and it is now failing to boot. Starts loading grub and I get this message:
mount: mounting /dev/disk/by-uuid/04aa3697-7bc0-45b5-b86a-77a1e6534bd5 on /root failed: invalid argument mount: mounting /sys on /root/sys failed: no such file or directory mount: mounting /dev on /root/sys failed: no such file or directory
[code]....
I booted with 9.04 LiveCD discovered the drive could not be mounted-ran fsck -ln and it told me the drive has no valid partition table. I have had intermittent problems mounting flash drives before this, so I'm kind of worried it might be a hardware issue.Also have files on that drive I would rather not lose, so reinstalling is hopefully a last resort.
I have written an init script and placed it in /etc/init.d/ directory.What I would like to know is, will the script run automatically or we need to install the script using "install_initd" command.If I have to invoke this command manullay, what will be the best place to do this ? Can I add this to "/etc/init.d/rcS" file
openSUSE 10.3 on Itronix IX260+ Stuck on command line, init 3, and all attempts at graphic init 5 fail. Get these messages:(EE) No devices detected; Fatal screen error: no screens found; AIGLX disabled Primary Device is PCI 01:00:0kernel:device-mapper:multipath round-robin:version 1.0.0 loaderkernel:device-mapper:table:253:0:multipath: error getting device kernel:device-mapper:ioctl: error adding target to tableProblem would seem to be with the device-mapper, but have no idea how to fix it.
While I was using my computer a few days ago, the terminal stopped working properly, so I tried to reboot, and when it started up again it wouldn't boot and said "no init found. try passing init=bootarg"
This has happened twice before, so I really need to figure out what keeps happening, otherwise I can't continue to use linux. i reinstalled both times before. i think that this is caused by a process that prevents me from using the hard drive, because when I try to check the disk in the terminal or in gparted, it says Device or resource busy while trying to open /dev/sda1. Filesystem mounted or opened exclusively by another program?
Also, in the disk utility, in the lower right corner of the filesystem it has a spinning "loading wheel".(i'm not sure if that means anything)
I am using ubuntu 10.10, but am not sure what kernel I am using, but i tried a few different kernel options(there's three of them at start up). safe mode does not work either.
I have installed a cluster computer with 10 nodes . The manufacturer is HP . All nodes and the master node have redhat enterprise linux installed in them . When I shutdown the nodes from the master terminal using "shutdown -h now" they get shutdown . But they dont get completely turned off . This issue bothers me when the power supply is given , all nodes boot up simultaneously generating a huge heat .
Thing to note : When we shutdown our PC they get completely turned off . When the power supply is given , a press on the Power On button is required to boot the system. But , why does it not happpen in the case of cluster? Is there any other way of completely turning off the nodes from the master terminal ?
I have a linux (Slackware) machine and the time/date is like, June 23rd 2003, 10:00am (It's 11 here) and I am not able to set the time to have it correct. I change the timezome to Montreal but the time is still wrong.
Is there a way to force it to sync with my domain controler or even another online NTP server?