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

learn more… | top users | synonyms

1
vote
0answers
21 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
209 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
52 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.
1
vote
1answer
724 views

Linux Mint: How to enble cryptswap with custom password?

When you want to use hibernation and you care for security, you'd like to have the swap encrypted. But not with the random password, chosen for you at startup, but with a fixed one, supplied by you at ...
8
votes
4answers
5k views

/etc/rc.d vs /etc/init.d

Is ubuntu's /etc/init.d directory exactly equivalent (functionally) to what I presume to be the more standard /etc/rc.d/ (at least on arch)? Is there any particular reason canonical used init.d ...
1
vote
1answer
51 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 ...
2
votes
0answers
22 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 ...
0
votes
1answer
59 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 ...
3
votes
4answers
7k 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 ...
0
votes
1answer
821 views

Converting update-rc.d redis_6379 defaults to chkconfig command

I'm trying to run the command below on CentOS and of course I get command not found: $ update-rc.d redis_6379 defaults How do I then perform the equivalent using chkconfig?
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
19 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
39 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
88 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 ...
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 ...
3
votes
3answers
555 views

How do I determine whether my services are using runit or init?

How do I determine whether my services are using runit or init? I use Ubuntu 10.0.4. Such as nginx, chef, puppet, etc.
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 ...
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
2answers
869 views

Sabayon - mysql (and other services) won't start

It's a fresh install of Sabayon Linux. I installed mysql (equo install dev-db/mysql), configured it (emerge --config ...), but it doesn't start using /etc/init.d script: # /etc/init.d/mysql start * ...
14
votes
3answers
43k views

How can I make a script in /etc/init.d start at boot?

I think I read something a while back about this, but I can't remember how it's done. Essentially, I have a service in /etc/init.d which I'd like to start automatically at boot time. I remember it ...
0
votes
1answer
83 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
93 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
46 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
85 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
159 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
321 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 ...
2
votes
1answer
159 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 ...
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 ...
0
votes
2answers
316 views

Jboss application startup and shutdown asks for password. How to automate with init script?

Jboss application startup and shutdown of BMC-IDM asks for password (called keystore password, some Java stuff). How to automate with init script? Stop application > stop_idm_suite.sh Suite ...
1
vote
1answer
202 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 ...
3
votes
1answer
291 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
274 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 \ ...
3
votes
1answer
662 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
44 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* ...
2
votes
2answers
201 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 ...
1
vote
0answers
146 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 ...
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
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
138 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
286 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 ...
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. # ...
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" ...
10
votes
2answers
9k views

How to make unix service see environment variables?

I have set my environment variable using /etc/profile: export VAR=/home/userhome Then if I do echo $VAR it shows /home/userhome But when I put reference to this variable into the ...
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
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 ...