Tag Info

Hot answers tagged

61

/etc/init.d contains scripts used by the System V init tools (SysVinit). This is the traditional service management package for Linux, containing the init program (the first process that is run when the kernel has finished initializing¹) as well as some infrastructure to start and stop services and configure them. Specifically, files in /etc/init.d are shell ...


29

The boot loader will load the kernel, the kernel would attempt to run init, not find it and panic. The way out of it is to reboot, edit the boot parameters, add init=/bin/bash and boot that way. The kernel will use bash as init. This will give you a chance to run commands and fix the system. Correction Apparently the kernel (file init/main.c) does: if ...


22

The solution is to approach the problem from the other direction: to satisfy the start criteria for Centrify, it is not necessary to make existing services depend on the new Centrify service, rather make the new Centrify service depend on existing services. For example, an Upstart configuration file /etc/init/centrify.conf could say: start on (starting ...


21

Your celeryd script is probably not executable, that's why sudo /etc/init.d/celeryd is returning command not found. So, you need to first make it executable. To do so, run the following commands: sudo chmod 755 /etc/init.d/celeryd sudo chown root:root /etc/init.d/celeryd The first line changes the permissions to -rwxr-xr-x, and the second line ensures ...


18

When you copy the script into place, don't forget to make it executable and owned by root: sudo chmod +x /etc/init.d/celeryd sudo chown root:root /etc/init.d/celeryd Once you have installed that, you can set it to start automatically on boot with: sudo update-rc.d celeryd defaults sudo update-rc.d celeryd enable


15

There is really never any compelling reason to use init 6 instead of reboot, unless: For some reason you are missing the reboot executable, or You are deliberately trying to avoid notifying users that the system is going down. reboot (so long as you don't run reboot --force) is actually the "softer" way to shut down. Consider: init 6 will run all of ...


13

The setting I am looking for is in /etc/default/rcS, FSCKFIX=yes. This means "automatically repair filesystems with inconsistencies during boot" and causes fsck to run with the -y flag. It was set to no in both of my Ubuntu systems. Even when set to no, the boot time fsck is still somewhat noninteractive. mountall runs fsck with -a, a synonym for -p, which ...


13

You can also run init-checkconf to check syntax init-checkconf /etc/init/job.conf File /etc/init/job.conf: syntax ok


11

If you do man inittab in your terminal, all shall be revealed: The /etc/inittab file was the configuration file used by the original System V init(8) daemon. The Upstart init(8) daemon does not use this file, and instead reads its configuration from files in /etc/init. See init(5) for more details.


9

First, you can check that your job is actually known to upstart: sudo initctl list | grep your_job_name If it's not found, you can try reloading the configuration and then re-checking: sudo initctl reload-configuration # re-check sudo initctl list | grep your_job_name Then try again to start your job: sudo start your_job_name If you weren't getting ...


9

It usually means you have an error in the .conf file - for instance I'm not sure the pid stanza is supported in 10.04, stop can't be used in the script etc. I'd try starting the file from scratch (with only start, stop etc), and then slowly building it up by adding more and more lines and testing it via start pure-ftpd. For example: # cat pure-ftpd.conf ...


9

James's answer works for a 1 to 1 dependency. For a 1 to many, i.e., to make sure service A starts before services B, C, and D, you need to take another approach. You can look at the current portmap scripts for reference but here is the general approach: create a wait script. Scenario: you want your Service A to always run before service-b, service-c, and ...


9

As you point out, the ".d" nomenclature is puzzling and strange, and doesn't really have any place in any modern system -- you'll notice that most modern services have tended to drop it. The reason the directory is /etc/init and not /etc/upstart is because Upstart is the project name, the actual installed binary is still /sbin/init thus it would not make ...


9

(Answered by OP) Got it myself! when new jobs are inserted into /etc/init then the update is not noticed until the next check. Myscript is at lot faster then check frenquence so the update needs to be initiation ny hand: sudo initctl reload-configuration Now it works as expected.


9

Nothing happens, until you try to reboot. As long as the system is running, and you don't try to switch runlevels by running /sbin/init n, you wouldn't even realize it was gone. Actually, deletion of /sbin/init is undoable if you realize the mistake early and stay calm. System administrators have recovered from much nastier "lobotomies" while keeping the ...


8

Ubuntu 14.04 uses Upstart as the init system, the plan to switch to systemd is planned for 14.10+. There are parts of "systemd" that have been used in Ubuntu for a long time, but for most intents and purposes when people say "systemd" they mean systemd-as-init. Here's some background info: ...


8

You cannot make a script that runs from init.d and displays a gnome-terminal window, because scripts in init.d run before there is any login session in which to display one. They run even before the graphical user interface is running. Logging to a File Instead If you need to run this script when the machine boots up, then instead of trying to make it ...


7

Marty Fried's answer contains the one most valuable info: the Cookbook. Reading thru that makes you more than able to write your init scripts. However, messing with init.d, rc*.d, chkconfig et al, is not what you want to do. On Ubuntu (and other distros), they're just remains of the old sysvinit stuff which many packages still use or just support for legacy ...


7

From Bellum PLC Forum - Ubuntu 11.10 init 100% cpu usage bug: I noticed an CPU usage issue with init due to upstart, Which was eating 99% ram constantly. and i decided to find working fix. This is a bug which has been confirmed by Ubuntu but below is a simple quick fix patch which should work completely for all. Firstly Open up SSH and add the ...


7

Upstart is the replacement for the traditional init.d style System-V bootup scripts. However, upstart is more than just a collection of bootup scripts. It allows in fact a minute planning and control of the start of different daemons. For instance, in order to automount network drives, you need first a working network. While before upstart these situations ...


7

MySQL is started by upstart. You can find the configuration file at /etc/init/mysql.conf


6

It is the upstart job configured in /etc/init/mountall.conf that in turn calls the ELF executable /sbin/mountall.


6

What does each of these do? networking: #!/bin/sh -e ### BEGIN INIT INFO # Provides: networking # Required-Start: # Required-Stop: $local_fs # Should-Start: ifupdown # Should-Stop: ifupdown # Default-Start: # Default-Stop: 0 6 # Short-Description: Raise network interfaces. ### END INIT INFO Regarding the package ifupdown ...


6

I don't trust anything but the kernel to keep a sane state here, so I don't (ab)use init to get this job done, nor do I count on myself actually knowing what is or isn't mounted (some packages can mount extra filesystems, like binfmt_misc). So, for process slaughter, I use: PREFIX=/mnt/chroot-0 FOUND=0 for ROOT in /proc/*/root; do LINK=$(readlink ...


6

See the manual for init on Unix systems. This is a post from the Wikipedia entry on init: In Unix-based computer operating systems, init (short for initialization) is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct or indirect ancestor of all ...


5

Yes. It's safe to view any system file(s), especially if you don't use sudo or root. prakhar@aS4v4g3wOrld:~$ ll /sbin/init -rwxr-xr-x 1 root root 265848 Jul 18 15:16 /sbin/init* The owner of /sbin/init is root. The only way you can modify this file is either via logging as root ($ sudo -s) or by giving an editor superuser permissions using sudo. Besides, ...


5

From the manpages: Runlevels are a concept from UNIX(R) System V used by the init(8) daemon or other system initialisation system to define modes of system operation. The Upstart init(8) daemon has no native concepts of runlevel, and unlike the System V daemon, makes no attempt to keep track of the current runlevel. ...


5

It's the mountall executable which parses the fstab file and mounts (and checks if needed) all the partitions specified there.


5

The links in /etc/rc?.d/ point to scripts in /etc/init.d/. As for brltty, it sounds like an accesibility feature for some Braille thing. First, try to find out to which package it belongs: $ dpkg -S /etc/init.d/brltty brltty: /etc/init.d/brltty Well, that's clear, the brltty package is responsible for this. Let's get more information about it: Excerpt ...



Only top voted, non community-wiki answers of a minimum length are eligible