The scripts to be executed at boot, usually for starting deamons and mounting file systems.

learn more… | top users | synonyms

1
vote
0answers
19 views

systemd: default value for environment variable

I would like to migrate some OpenRC init script to systemd but I think that it is general problem of environment variables handling in systemd. Original OpenRC files There is a file e.g. ...
1
vote
1answer
25 views

dhcp without dns: ping `hostname` not working. Auto add hostname to /etc/hosts?

On RHEL 6.5 how to make my own hostname locally resolvable, if my ip address is dynamic and not registered in DNS? I know, it's possible to add dhcp hook scripts. Is there a similar way to hook the ...
7
votes
1answer
205 views

Init as a shell script

I was going through a tutorial on setting up a custom initramfs where it states: The only thing that is missing is /init, the executable in the root of the initramfs that is executed by the ...
0
votes
2answers
50 views

I need to run a one line startup script under gnome and systemd

nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 now what is the easiest way to run this one bash line of code at startup??? I am running Gnome 3.14.
2
votes
0answers
21 views

User specific script on login independent of login handler

I am trying to run a script automatically under the following circumstances: A specific user logs in. Independently of how the user is logging in: be it through the shell, a desktop environment ...
1
vote
1answer
50 views

Why does my script does not run in runlevel 0?

I made a script with following LSB header #! /bin/sh ### BEGIN INIT INFO # Provides: updateservice # Required-Start: $local_fs $time $network $named $syslog # Required-Stop: $local_fs ...
0
votes
1answer
57 views

Syncthing daemon starts manually using script, but not at startup

I have installed syncthing on a Linux Mint Debian Edition machine and am trying to get it started at boot time using an init script in /etc/init.d. I followed this tutorial. Symlinks in /etc/rc.* ...
1
vote
2answers
49 views

/init can't find /bin/mount, but find / can?

I have trouble, while booting up a linux machine of mine. During the boot phase, while running the /init script it complains about not being able to find mount. My PATH variable is set to /sbin and ...
0
votes
0answers
47 views

autoconf and sysvinit/systemd etc

A constant problem I run into with autoconf is init scripts. The whole point of autoconf is of course portability, and the various init systems (sysvinit, systemd, upstart) - not to mention various ...
1
vote
0answers
18 views

Always try to stop daemon on shutdown without a lock file in /var/lock/subsys/

Normally, if a lockfile doesn't exist in /var/lock/subsys/, rhel doesn't try to stop the daemon, even though a link exists: /etc/rc0.d/K??svcname. There're daemons that are not always started by ...
1
vote
1answer
37 views

Change to rc.local causing hang on tty1

I added a script execution command to my rc.local but forgot to run it in a separate tty. The script has an infinite loop and has hung my tty1. Ctrl-C does not do anything and I don't have another ...
3
votes
1answer
87 views

What does the hyphen mean in chkconfig run level in an /etc/init.d script?

I just have a simple question but scouring the search engines I have not found any explanation of what the - (hyphen) in the chkconfig run level actually stands for within the init script file. For ...
1
vote
1answer
60 views

Is it possible to create a Linux environment without a traditional command shell?

i.e. Using something like IPython, re.pl, or somesuch as a login shell, instead of bash/ksh/etc. Using initscripts, etc. written in Python or some other scripting language, and making no use of ...
2
votes
1answer
60 views

What's the difference between TYPE and DEVICETYPE directives in ifcfg scripts?

While learning the Network Teaming objective of the RHCE (RHEL7) exam I noticed that examples use DEVICETYPE directive in the ifcfg scripts for master and port interfaces. I knew there was TYPE ...
0
votes
1answer
81 views

Init script to run a script as specific user

/apps/data/service/bin/startup.sh This is the script i want to be executed during RHEL booting. I want it to be run in runlevel 3 only. And i want this script to be started as specific user, ...
1
vote
1answer
78 views

Unable to start locally-built ntpd from system service script

I built ntpd from source, which process put it in /usr/local/sbin. Of course, the ntp service points to /usr/sbin. So, I thought I could just change the path in the init.d configuration file like ...
1
vote
2answers
74 views

profile.d on headless server

Is it a bad idea to put variables needed by a daemon program running at boot on a headless system in /etc/profile.d/? From my understanding profile.d doesn't get executed until someone logs into the ...
1
vote
2answers
48 views

Restarting a service from a script

I have a init script - /etc/init.d/myservice, which starts some processes, including a CLI process. And from this CLI process, I am adding a command which can be used to restart the service (restart ...
2
votes
1answer
45 views

Automatically starting smuxi-server

Smuxi (isn't that a weird name?) is an IRC client, which has a decoupled server and client setup. The server sits in some always-on machine in "the cloud" and the client connects to it from a local ...
0
votes
2answers
84 views

rc.local hang on bootup

My rc.local is stuck in an infinite loop since I accidentally put a wrong I/O redirection in and it's executing itself over and over again. I'm on Red Hat 6.5 and would like to know how I can start ...
1
vote
1answer
155 views

Kernel logs on power failure

I was wondering if it was possible to have a logging program document a random power failure. Clearly it won't have any time to log when the power fails, but is there a way to recognize a power ...
1
vote
1answer
317 views

How can I kill child processes with start-stop-daemon?

I'm writing a simple web server using nc and bash. It looks like this: #!/bin/bash rm -f /var/run/streamman/out mkfifo /var/run/streamman/out trap "rm -f /var/run/streamman/out" EXIT while true do ...
1
vote
0answers
23 views

Multiple daemons init script

I have two daemons currently running on my development server (OpenSUSE 12). There are two daemon that work together as a whole and must start together and die together. Is there a standard way to ...
2
votes
1answer
155 views

How can this init script start without its dependency?

I'm working on some lsb init scripts. Here's the init info from one of them: ### BEGIN INIT INFO # Provides: myscript # Required-Start: networking myotherscript # Required-Stop: networking ...
3
votes
1answer
290 views

Install init scripts manually under Debian Wheezy

I played around with LSB-compatible init-scripts under Debian Wheezy (init is from sysvinit package version 2.88dsf-41+deb7u1). My script in the /etc/init.d directory is as follows: root@T60:~# ls -l ...
1
vote
1answer
272 views

start-stop-daemon returning always 0 (success)

I have set up start-stop-daemon to start my script automatically case "$1" in start) log_begin_msg "starting foo" start-stop-daemon --start --chuid nobody --user nobody --pidfile \ ...
1
vote
1answer
199 views

If a start-up script in `init.d` has standard output, where is that logged if anywhere?

We have a startup script that is symbolicly linked to /etc/rc0.d/K01ourapp. Apparently, it is not working as expected during shutdown. The script actually does a few echo calls that may help in ...
1
vote
0answers
43 views

Where sysv-rc-conf gets information about daemons?

Recently I deleted an init-script of my program both from filesystem and with update-rc.d: update-rc.d foobar remove But sysv-rc-conf still lists it, though I can't see links in /etc/rc* ...
3
votes
1answer
647 views

Minimal Linux with kernel and BusyBox: /etc/inittab is ignored, only /init is executed

I managed to create a small and fully functional live Linux CD which contains only kernel (compiled with default options) and BusyBox (compiled with default options + static, all applets present, ...
1
vote
0answers
145 views

Ubuntu Trusty Preseed Error

I have a preseed file that installs Trusty but the install is giving me this error: Jul 22 17:52:42 in-target: Setting up sysv-rc (2.88dsf-41+deb7u1) ... Jul 22 17:52:42 in-target: info: Reordering ...
2
votes
1answer
34 views

Late running of scripts during bootup, ending with a reboot without the login prompt

I'm making a special "installer" for an embedded system where I'd like the kernel to boot up, execute a set of things very late in the process where the peripherals have been set up and then reboot ...
3
votes
1answer
70 views

Grepping a variable

I've written a simple init script to start and stop a Python script as a service. I have to be explicit about the version of Python I'm running, because this is on a CentOS 5 box with Python 2.4 & ...
2
votes
2answers
193 views

How can I make this System V init script start at boot?

I've installed udisks-glue on my Raspbian Raspberry Pi, along with a System V init script at /etc/init.d/udisks-glue (as per instructions here). I make it executable and run the following, which ...
3
votes
1answer
136 views

Process management and pkill

I've been studying process management using shell scripts and I'm starting to realise how difficult it is to make sure that it's done right. For example, you can record the PID of a program to a ...
1
vote
1answer
281 views

What is the difference between rc, rc.local and rc.sysinit?

I tried to display the list of startup scripts for the current runlevel at bootup. I wrote the following code. rl=`runlevel | cut -d " " -f2` ls /etc/rc.d/rc$rl.d/S* | cut -d "/" -f5 sleep 10 It's ...
0
votes
2answers
1k views

how to create php-fastcgi.sock for Nginx

I've installed Debian Wheezy and downgraded php5.4 to php5.3, and wanted to use fastCgi instead of php-fpm since it is not included in php5.3 package. now I run into a little issue and can't seem to ...
0
votes
0answers
48 views

Can not call a command

I have a script /etc/init.d/tilestream with: TILESTREAM="/usr/bin/tilestream" MAPPATH="/data" HOST="host" #HOST="localhost" #UIPORT="9001" UIPORT="8888" #TILEPORT="9000" TILEPORT="8888" ...
2
votes
0answers
73 views

Matterhorn dead but PID file exists

Installed opencast-matterhorn14 in a Centos 6.5 Machine and after Installation steps while I try to run the Matterhorn using service matterhorn start I keep on getting the same error: ...
0
votes
1answer
162 views

Should “invoke-rc.d” or “service” be used to restart services?

I'm confused as to which is best and in which circumstances: invoke-rc.d apache2 restart or service apache2 restart Is there a real difference? man service has the following interesting bit: ...
0
votes
1answer
52 views

init.d script won't send graphical data

I have a client sever java program. The client's work is to capture the screen and send data to server. An additional function it does is opens the website given from server and send some text to ...
1
vote
2answers
255 views

/etc/init.d permissions issue

We are trying to harden our Linux Redhat 5 servers and one of the findings is for the /etc/init.d. The security finding is requiring that we chmod it to 700 or more restrictive. Please see the ...
4
votes
1answer
232 views

BASH_ENV and cron jobs

I have several questions related to non-interactive, non-login shells and cron jobs. Q1. I have read that non-interactive, non-login shells only "load" $BASH_ENV. What does this exactly mean? Does ...
5
votes
5answers
605 views

Removing unused init scripts

On my Debian server, I have no network shares (NFS, SMB, ...). I am trying to optimize and simplify my boot process. Is it OK to remove the following init scripts? /etc/rcS.d/S12mountnfs.sh ...
2
votes
1answer
538 views

Migrate socat init script to systemd

I use socat with following init script on debian 7.2 with sysVinit. It works perfectly: #!/bin/bash DESC=socat DAEMON=/usr/bin/socat LIB=/usr/lib/socat SOCAT_ARGS="-d -d -lf /var/log/socat.log" [ ! ...
4
votes
2answers
69 views

What's the recommended way to run a service as a non-root user?

I have a simple init.d script which starts and stops a process. I call the init.d as root, but I'd like the process it controls to run as a specific user. The most common suggestion online seems to ...
3
votes
4answers
6k views

hostapd will not start via “service” — but will start directly

I am having trouble getting hostapd to start as a service. It fails when I try to start it: $ sudo service hostapd start [FAIL] Starting advanced IEEE 802.11 management: hostapd failed! From what ...
2
votes
1answer
4k views

Upstart documentation for CentOS 6

I am currently migrating from CentOS 5.5 to 6.4. Having fun converting /etc/inittab stuff to upstart. Ran into a lot of little problems but am getting the hang of it now. The best documentation ...
4
votes
2answers
1k views

Why pidof and pgrep are behaving differently?

I have a init script in /etc/init.d/myservice for initialize a service like this: ... start() { ... daemon /usr/sbin/myservice ... } stop() { ... pgrep myservice pidof myservice ps -ef ...
18
votes
1answer
1k views

What sets systemd apart from other init systems?

It is not quite official but it looks like systemd is coming to Debian and after reading some of the heated mailing list discussion on that decision, I am curious about the polarizing nature of ...
4
votes
3answers
264 views

Why doesn't rc.local run entirely

Here is my rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # ...