Questions tagged [init]

119 questions
3
votes
1 answer

init doesn't kill zombies

I have some zombie processes on my system. I've killed the parent of those zombies hoping init will take over and free up the resources (lots of sockets in CLOSE_WAIT). However init is not removing those proceses from the system: #ps ax ... 17051 ? …
facha
  • 1,368
  • 2
  • 18
  • 26
3
votes
4 answers

Solaris: reboot vs init to get to single-user mode

I have inherited instructions that say to get to single-user mode on Solaris like: Execute reboot -- -s Mount all file systems My question is, why not just do: init 1 What's the difference?
David Citron
  • 143
  • 1
  • 2
  • 7
3
votes
1 answer

What initiates parsing of the /etc/sysconfig/network-scripts/ifcfg-* interface scripts?

I have been searching for a while and looking at source code and various scripts on the Linux filesystem and still have been unable to figure out what ultimately initiates the reading of the scripts for network interfaces (or other interfaces) in…
SeligkeitIstInGott
  • 179
  • 2
  • 5
  • 19
3
votes
2 answers

How to respawn a script in RHEL/Centos6 when /etc/inittab has been deprecated?

I have a custom init script and I want that script to be respawned if in case the process dies. In RHEL/Centos 6 /etc/inittab is deprecated. So how should I ensure the process will be respawned?
Shashank
  • 31
  • 1
  • 2
3
votes
3 answers

CentOS: Init scripts failing to start for some unknown reason

I'm running CentOS 6.2 - I've just migrated some applications over to a failover server, and copied their init scripts into /etc/init.d. I've made them executable, added them to chkconfig, with chkconfig -add, set their levels, made sure they're…
user705142
  • 433
  • 6
  • 16
3
votes
2 answers

Is it possible to set an Upstart service to stop $LAST

I'm wanting the rsyslog service to run until the last moment to ensure we receive as much logging as possible on our central logging servers. On Ubuntu 11.04, rsyslog's stop line is set to "stop on runlevel [06]" so it stops before (at least)…
cjs226
  • 61
  • 4
3
votes
2 answers

Running sudo commands in cloud-init script

I'm developing an automatic bootstrapper for some servers as we are using Amazon EC2 for our infrastructure. What I do is: run a Fabric script which connects to EC2 and initializes a new instance, putting in user-data a cloud-init script. This…
victorcampos
  • 185
  • 1
  • 6
3
votes
2 answers

how to spawn php-cgi automatically when it exits?

I am using php-cgi on ubuntu(with nginx), and the command to start it is: spawn-fcgi -a 127.0.0.1 -p 9100 -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid but sometimes the php-cgi process will exit automatically, and I need to start it manually. Is…
Bin Chen
  • 165
  • 4
3
votes
2 answers

How can I make sure an init.d-script runs after network-interfaces received their addresses over DHCP?

I just installed couchdb on a debian5 system and added symlinks to the /etc/init.d/couchdb-script. Unfortunately, this script gets triggered on startup before the network interface received the address over DHCP that the couchdb-server tries to bind…
flitzwald
  • 188
  • 1
  • 8
2
votes
1 answer

How to find the file location of int.d scripts in ubuntu

I need location of a init.d script. I am using service cinder-api start to start the service Other init scripts are located at /etc/init.d/ location. But this service is not found in that location , its starting and stopping using service cinder-api…
manikantanr
  • 123
  • 1
  • 1
  • 3
2
votes
2 answers

Server won't boot, kernel panic - not syncing

After a reboot of a CentOS 6.2 server we are getting a kernel panic with the following error: Kernel panic - not syncing: Attempted to kill init! Panic occurred, switching back to text console When passing init=option selinux=0 to the kernel at…
Tbuermann
  • 41
  • 1
  • 1
  • 4
2
votes
1 answer

Waiting for devices to come up on Debian boot

I'm running OpenVPN and dnsmasmq on my wheezy system. Dnsmasq is only necessary for VPN and local users, so I don't want it to listen on all devices (yes, there is also a firewall, anyways). When the services get started at boot, openvpn is started…
Michael
  • 123
  • 1
  • 8
2
votes
2 answers

Is it acceptable to use `grep` to check for the presence of a string in a file within an init script?

Is it okay for me to check the contents of a file for a given string with grep in an init script? I am concerned about introducing dependencies and general convention when it comes init scripts, and if running grep or other tools violates some…
brandeded
  • 1,845
  • 8
  • 32
  • 50
2
votes
3 answers

Ubuntu Server: Running processes at boot time

How do I make Ubuntu Servers run services at boot time, in a specific order? I have read a bit about Upstart, init.d and inittab, and I'm not sure what's the right approach for doing it. Thanks, Udi
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
2
votes
1 answer

Upstart and pre/post scripts

I run into an issue with upstart where I want to update an init config, but just restarting the job doesn't apply the changes. For example: I've got job xyz running I modify the /etc/init/xyz.conf to do something in pre-stop. The job gets restarted…
viraptor
  • 1,296
  • 6
  • 21
  • 41