Hi All,
I have one situation to shut-down the system through shell script.I need script command to shut-down the system and process should end(safe-mode) the MyEclipse.
I am having exactly the same problem with https://www.unix.com/programming/129264-application-cleanup-during-linux-shutdown.html but the thread is old and closed. The only difference is that I use sigaction() instead of signal(), which is recommended, as far as I know.
This is my code:
... (9 Replies)
Hello,
from last few days my laptop is not whutting down properly.. when ever i ty to shutdown it restarts again.. what may be problem?? antivirus is updated till date.. and i use windows xp sp2....
regards,
deepak. (5 Replies)
I am working on a SUN T2000 machine with Solaris 10 running on it. When I checked the system this morning, I found it to be turned off. The lastreboot command showed that the system had been shut down the previous night.
I want to find out how the system was shut down. I have run hardware health... (2 Replies)
Ok here is the problem we have 2 v440 with same IP address running solars 9. one remains on the other remains off. They are both configured exactly the same for redundant purposes for the software we use. This was the best/worst idea. Great because down time is only a mere minutes. The bad is the... (7 Replies)
ROUTE.CONF(5) BSD File Formats Manual ROUTE.CONF(5)NAME
route.conf -- static routes config file
DESCRIPTION
The route.conf file is read by the staticroute rc.d script during system start-up and shutdown, and is intended for adding and removing
static routes.
FILE FORMAT
Lines starting with a hash ('#') are comments and ignored. Lines starting with a plus sign ('+') are run during start-up, while lines start-
ing with a minus sign ('-') are run during system shutdown. If a line starts with a '!', the rest of the line will get evaluated as a shell
script fragment. All other lines are passed to route(8). During start-up, they are passed behind a ``route add -'' command and during shut-
down behind a ``route delete -'' command.
FILES
/etc/route.conf The route.conf file resides in /etc.
/etc/rc.d/staticroute
rc.d(8) script that parses route.conf.
EXAMPLES
In this example, the interface for the desired routing changes is set, the IP address on that interface is determined, and a route is added
during startup, or deleted during system shutdown.
# Set interface and determine current IP address for added route.
!ifname=bnx0
!ipaddr=$(/sbin/ifconfig ${ifname} | awk '$1 == "inet" {print $2}')
net 10.10.1 -interface ${ipaddr}
In this example, IP forwarding is turned on during start-up, and a static route added for 192.168.2.0. During system shutdown, the route is
removed and IP forwarding turned off.
# Turn on/off IP forwarding.
+sysctl -w net.inet.ip.forwarding=1
-sysctl -w net.inet.ip.forwarding=0
net 192.168.2.0 -netmask 255.255.255.0 192.168.150.2
SEE ALSO rc.conf(5), rc(8), route(8)BSD May 1, 2012 BSD