Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sysvinit]

SysVinit is a set of programs and scripts that control the startup, running and shutdown of all other programs.

0
votes
1answer
26 views

debian 9 init.d and systemd [duplicate]

By default in Debian 9 systemd is the default. But I still see a lot of things under /etc/init.d directory. Does that mean I still can put things there to start up? Which directory (systemd or init.d) ...
0
votes
0answers
41 views

kill -s SIGINT does not work as expected when launched from init.d script

I want to start some python script (with venv) at startup and monitor the status, for auto restart it if something goes wrong. I've made: - a simple python example prg.py that sleep forever and exit ...
1
vote
0answers
13 views

Conditionally run command in init.d service script stop() on shutdown/reboot in CentOS6

I have a service script in CentOS 6.10 that needs to touch a file when service myservice stop is called by the user or process, but not when stop() in the script is invoked by shutdown or reboot by ...
0
votes
1answer
30 views

How to make my sysvinit service work on as many distros as possible?

I am attempting to write a cross-platform sysvinit service that works on as many sysvinit systems as possible. Things I need: The process needs to daemonize (it does not automatically daemonize ...
0
votes
0answers
30 views

Kick a command when shutdown, and cancel shutdown if needed

I want to see if a process is running when shutdown is requested, and abort shutdown process if it is. I know I can run a script within shutdown/reboot phase using init script etc. But, is there any ...
0
votes
0answers
33 views

Serial console and terminal with openrc and sysvinit

I have a PC with a serial interface and I would like to run GNU/Linux on it using a serial console (this would spare me attaching a screen and a keyboard to it since I would like to use it as a server)...
2
votes
1answer
49 views

/etc/inittab respawn already running process, Debian9

I added an antry in /etc/inittab to respawn a binary. The entry is like: id:2:respawn:/path-to-my-bin I then execute init q and the process is started by inittab. If I kill the process, it's ...
2
votes
1answer
32 views

How to change SysVinit service without editing init script?

Let assume a service is xyz. In systemd, the /lib/systemd/system/xyz.service file has this command: [Service] ExecStart=/usr/bin/xyz --foo I want to add --bar option in that command. With systemd, I ...
1
vote
1answer
81 views

How to determine the order of services that start from /etc/init.d

ls -l /etc/init.d/ gives me a list of services are that are started on linux. How do I know the order in which the services are started? Like if ls -l /etc/init.d/ lists out serviceA serviceB ...
0
votes
0answers
38 views

/etc/init.d and /etc/rcX.d/: how do they work with systemd

I've known that Debian and Ubuntu have used systemd to manage the services running at boot time. I've known that there were /etc/rcX.d/ and /etc/init.d/, which are also about services running at boot ...
0
votes
1answer
139 views

Tiny Core: startup script and persistence

I need a very lightweight, and I found Tiny Core Linux, which I installed following this guide, but I have several problems, related to adding SysVinit (in which is based) startup scripts: Anything I ...
3
votes
1answer
43 views

Is there a daemon which resolves a service name to a port?

A DNS server resolves a hostname to an IP address. A program can resolve a hostname to an IP address by calling getaddrinfo() which in turn asks a DNS server to do the resolution, if I am correct. In ...
0
votes
0answers
37 views

Getting return status from Python script that is called from init.d script?

I am a bit of an amateur when it comes to init.d. I have an init.d script which is kicking off a Python script when the machine boots. The Python script is intended to run across multiple OS's (...
0
votes
0answers
9 views

Server mount facility names

I have a service that mounts a server in a folder in /etc/init.d Sometimes it runs when I start the computer, sometimes it doesn't. I think that it depends on the wireless connection. If it is ...
0
votes
1answer
106 views

Why is there a `systemd` process owned by each user that is logged in?

In my ps output: root 1 0.0 0.0 225552 5316 ? Ss /lib/systemd/systemd --system --deserialize 19 message+ 572 0.0 0.0 51564 3076 ? Ss /usr/bin/dbus-daemon --system --address=...
0
votes
3answers
45 views

Is telinit run as a daemon?

In sysvinit, telinit is a symlink to init. init is run as a daemon. Is telinit run as a daemon? I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to ...
-2
votes
1answer
71 views

In sysvinit, do `telinit` and `init` run in the same process?

In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html /sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. ...
-1
votes
1answer
32 views

On OSes with SysvInit, are `reboot` and `halt` symlinks to some executables?

On OSes with Systemd, reboot and halt are symlinks to systemctl. On OSes with SysvInit, what are reboot and halt symlinks to? Is it telinit? Or are they themselves executable files, not symlinks? ...
3
votes
3answers
869 views

What is the difference between “init” and “service manager”?

From When the operating system shuts down, how does a service manager know that it should sends SIGTERM and SIGKILL to its services? systemd IS BOTH the init and service manager What is the ...
0
votes
1answer
38 views

Mounting fstab using mount -a not working like regular mount

So I'm writing an custom init script and I want to mount / as rw. In /etc/init.d/rcS when I use mount -t ext4 -o remount /dev/sda / it does remount as rw but when I do mount -a (or I even tried mount -...
0
votes
1answer
481 views

Status of sysstat.service showing active(exited)

When I see status of sysstat is see the following, ● sysstat.service - Resets System Activity Logs Loaded: loaded (/usr/lib/systemd/system/sysstat.service; enabled; vendor preset: enabled) Active: ...
4
votes
1answer
585 views

Whither /etc/init.d/skeleton?

Long-standing advice on writing van Smoorenburg rc scripts for Debian, from many sources including the Debian Policy Manual and answers on StackExchange, until now has been: An example on which you ...
1
vote
0answers
32 views

Switch root filesystem after copy

I currently have a script that copy the content of a microSD card to the eMMC of a BeagleBone Black. Once the copy is done, I would like to switch root filesystem for the eMMC and finish installing ...
1
vote
0answers
21 views

Program stops for some reason, while executed via init.d, but not in nohup call

I have created my own heat-control circuit on my raspberry pi, that controls pumps of my home-heating system. The program is executed each time, Gnu/Linux starts (I put the program into init.d and ...
0
votes
1answer
68 views

Starting UWSGI via init.d script exits with exit code 1 and says 'failed', but processes are running fine

Before this gets flagged as a duplicate, I read this question; however adding logfile2 did not change anything. I'm currently creating a docker container that runs a Python stack with UWSGI, for this ...
1
vote
1answer
344 views

Failed to execute /init (error -13), can't run '/etc/init.d/rcS': No such file or directory

Last night I broke my Arch. Now, when trying to boot, it says: [0.595364] Failed to execute /init (error -13) : can't log to /dev/tty5 starting pid 131, tty '': '/etc/init.d/rcS' : can't log to /dev/...
0
votes
0answers
296 views

Does “### BEGIN INIT INFO” section of service scripts have any effect in Centos? [on hold]

I am testing under: Centos 6.8 If I do man chkconfig there is a section saying the following: chkconfig also supports LSB-style init stanzas, and will apply them in preference to "chkconfig:" ...
1
vote
0answers
49 views

Unable to fully execute the task before Shutdown

I have created the script in /etc/init.d/backup, Its function is to take the backup of all the data which took around 10 -15 minutes. I want to execute at shutdown (runlevel 0) and reboot (runlevel 6)....
2
votes
0answers
218 views

jar executed in a service not logging [closed]

I've wrapped a jar in a init.d service following the guide here. created the service file under /etc/init.d/ give proper permissions test the stop and start: sudo service myservice start/stop/restart;...
4
votes
1answer
477 views

Is it possible to run Devuan Ascii with OpenRC init?

I have Devuan Ascii with SysVinit installed. I see that the openRC version is much older in Devuan ascii repository. Has anyone tried Devuan with openRC? Is the parallel starts enabled for openRC?
0
votes
1answer
69 views

How to run a script code in Linux Ubuntu when start up?

sudo nano /etc/init.d/deneme.sh After that #!/bin/bash echo "HELLO WORLD" then chmod 755 deneme.sh I didnt see Hello world text when I reboot to Linux Ubuntu ? What is the problem ?
1
vote
1answer
486 views

Init scripts invoking script on a user's directory — not working (Ubuntu 18.04)

I want to automatically start email tunnels and socks proxy at boot time. I have an /etc/init.d/email-tunnels script that invokes another script under my home directory. It won't work at boot time, ...
0
votes
1answer
77 views

what dependency-based linux init systems suitable for embedded systems?

Currently, I run Linux on an arm board using Sysvinit, but the network drivers of my board are not the best which causes the network service to stall the boot for a while, I also have problems with ...
2
votes
1answer
220 views

Porting init.d script to systemd

#!/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON="/usr/local/bin/redis-server" PIDFILE="/var/run/redis/redis_7128.pid" RUNDIR="/var/run/redis" REDIS_USER="redis" ...
1
vote
2answers
1k views

Can I use SysV init scripts for systemd

In Ubuntu 14 I have a bunch of SysV init scripts (/etc/init.d/). After migration to Ubuntu 16 they do not really work, as I understand Ubuntu 16 generates systemd unit files on the fly. Some ...
1
vote
1answer
31 views

Is there a list or a document about init.d default scripts?

From my understanding, ls -l /etc/init.d list all the scripts currently inside init.d, including those that was created later by user. If it's true, then I want to ask is there a document or list to ...
0
votes
2answers
420 views

How to write access to default /etc/init.d

I am trying to install Proteios software in Ubuntu 16. One of the requirement for this software is (*) Write access to $SERVICE_PATH(default /etc/init.d) How can I achieve this?
1
vote
1answer
154 views

Init startup script ordering

In the /etc/rc5.d directory there are example 2 shells to be executed on boot. S02dbus-1 and S20syslog. From my understanding S02dbus-1 will be executed first. Now if I take a look at the shell script ...
1
vote
2answers
269 views

fstab mounting time

I'm working on a script that is supposed to execute on startup, but the problem is that the script requires some files that are on a shared drive that is automatically mounted via fstab and at the ...
4
votes
1answer
246 views

Trying to convert RHEL6 init script to systemd

I currently have an init script on a RHEL 6.x box that is used to start various license servers for an engineering group. Each vendor has their own processes, env variables and other specifics to ...
0
votes
0answers
35 views

What happens when a process in SysV boot fails?

If using SysV what will happen if a process fails during the init ? For example assume that the processes in the figure will be executed sequentially. So first networking, then dbus-1,... Now my ...
6
votes
2answers
352 views

Where is fsck run?

I was reading through all the things that are run during bootup and have seen that after mounting the rootfs, /sbin/fsck.ext4 is run and after that systemd is run. I was wondering where or how fsck is ...
0
votes
0answers
117 views

System V - Respawn service but don't launch at boot

I'm trying to have a System V service relaunched on exit. EDIT: Should have precised that I'm using busybox init system instead of classic systemV I found that It could be done using /etc/inittab ...
0
votes
0answers
78 views

Custom /etc/init.d/puma script - What is being executed when invoked with start/stop/…?

Was trying to build my own custom /etc/init.d/puma script for handling puma processes, but cannot get any of my actual script to be executed when any of the normal keywords are used: sudo service ...
0
votes
0answers
84 views

Trying to create a startup script

I followed this guide to create a startup script that mounts my shared windows folder and starts my VPN. However, the script is still not working on the startup. I am currently using VM VirtualBox to ...
0
votes
0answers
253 views

Accessing initramfs-tools features in Yocto generated initramfs image

I would like to load a few kernel modules, and activate framebuffer access prior to Plymouth launch. This is normally done using /etc/initramfs-tools directory provided with the initramfs-tools. ...
1
vote
2answers
814 views

How to determine a Linux distro is systemd or sysV init without installing or booting?

I noticed in somewhere that most of the Linux distro are based on Systemd instead of SysV init. So I just want to know without installing and booting. Is there any possible way to find distro based ...
0
votes
1answer
820 views

Automatic sudo permissions for startup script

I need to run a script upon startup, which I understand needs to be done in the init.d folder. Now this script requires sudo permissions, it prompts the user for the sudo password when being run ...
0
votes
0answers
85 views

How to determine boot time in SysV?

In systemd-based distros there is a tool run via systemd-analyze which allows the user to determine boot time [kernel and userspace, the time it took for the system to boot up]. Is there a similar ...
2
votes
2answers
1k views

Cannot start Springboot as init.d service on port 80

I've been following the official guide to setting up Springboot as an init.d service on an Amazon Linux ec2 instance. Before I got to this setup, I was running into the problem where I could not start ...