Questions tagged [sysvinit]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
42 views

What was runlevel 4 used for with SysV init?

I'm reading about SysV init and I see there are levels 0-6. I understand that level 4 could be defined by the OS operator for special purposes, but I'm having trouble thinking of any examples. Has ...
0
votes
0answers
16 views

Replace Suspend Method for Devuan

I have a problem with Devuan Jessie where, whenever I try to suspend my session, it seems to just shut down. I found an alternate suspend script online which seems to work just fine. So I'd like to ...
0
votes
0answers
14 views

How to edit configuration of Ubuntu init.d NGINX script

I am using init.d to daemonize my NGINX process. The location of the script is /etc/init.d/nginx. When I edit this file, all I see are special characters like it's an executable non-editable file. How ...
0
votes
0answers
20 views

Ubuntu 16.04 - Nginx install is using the old Nginx init.d method

Ubuntu 16.04 - Nginx install is using the old Nginx init.d method. How would I switch to systemd without conflicting with the init.d method? Is there even a reason to?
-1
votes
3answers
256 views

Understand the /etc/inittab

I am using the following /etc/inittab file (systemv): # /etc/inittab: init(8) configuration. # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ # The default runlevel. id:5:initdefault: # Boot-...
0
votes
1answer
19 views

start a service before than another

I want to change the iptables at 3rd. By default, in directory /etc/rc3.d iptables service is S08iptables and I want to change it to S03iptables I executed the command below: ckconfig --level 3 ...
0
votes
1answer
22 views

Variants of startup scripts

i have read of multiple options to have a script executed on startup on my gentoo linux: systemd-service init.d local.d cron are there any other options beside these?
0
votes
0answers
35 views

execute script on startup without rc-update

I want to execute a script that sets iptable rules on each startup. I read about the option to write a *.start script to /etc/local.d here, but I cannot execute rc-update add local default to add ...
0
votes
1answer
24 views

A clean way to set a daily running time for a program

Kind of a noob question but I'm looking to have my networking daemon (wicd), run every day on my machine, only from 5am-6am and 6pm-7pm, regardless of when my machine was turned on, in other words, if ...
0
votes
0answers
27 views

What mean the number after S or K in /etc/rc{0-6}.d [duplicate]

I've already know that with an S will be started at the runlevel in question while those whose name begins with K will be killed. But there is some meaning in the number after S or K? one example: /...
1
vote
1answer
143 views

Linux ioctl VT_GETSTATE fails if process is run manually

I'm using the ioctl syscall on Linux to get the current tty in a C program. I don't know why the ioctl fails if the program is run manually (as root) while it works as expected if the init.d script ...
2
votes
1answer
34 views

PID is different if starting with init.d

I'm currently on a Debian 10 machine working as a small server. I installed aria2c and use it as a download service. Everything is working probably so far. My question is: I started the aria2c as a ...
1
vote
1answer
43 views

Why does my init.d script work when invoked manually, but not on startup?

My goal To run x.flux with parameters on startup My attempt An init.d script. It can be invoked manually via sudo /etc/init.d/xflux start [ ok ] Starting xflux (via systemctl): xflux.service. My ...
1
vote
0answers
129 views

OpenWRT BusyBox init does not create /etc/init.d/rcS

I'm building an OpenWRT image (Chaos Calmer) that needs BusyBox to be configured to use init. So, in the busybox configuration, I enter the Init Utilities menu, then enable init, as well as support ...
2
votes
1answer
350 views

Can't enable grafana on boot in Fedora because systemd-sysv-install missing

Fairly stock standard Fedora 30 install: $ uname -a Linux <redacted> 5.1.16-300.fc30.x86_64 #1 SMP Wed Jul 3 15:06:51 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/fedora-release Fedora ...
0
votes
1answer
67 views

Need help to create (or convert) a service for Slackware

I recently switched to Slackware. I want to use NordVPN. The problem is, they only provide .rpm and .deb packages. But that's not really important. I just extracted .rpm contents and the program is ...
0
votes
1answer
51 views

Autostart pure-ftpd by running its Perl configuration file at the command line

I have manually built the pure-ftpd on my Raspberry Pi and it runs perfectly fine when I invoke /etc/pure-config.pl /etc/pure-ftpd.conf from the command line. I'd like to run that simple command /...
0
votes
1answer
38 views

Busybox init, Kivy python application appears to block execution of ifup

I am experimenting with Buildroot, trying to create a minimal system to optimise cold boot time into a Python application (Kivy GUI). I chose to use Busybox init process because this is supposed to be ...
0
votes
0answers
24 views

Aliases for Networking Commands

I need to run a legacy script on some newer systems, without installing packages or loading binaries. The script uses some of the older networking and SysV init commands. Is there a set of aliases ...
1
vote
0answers
106 views

pidofproc or pidof working from init.d but not from /usr/sbin

I have a Linux service I'm supporting. It offers the usual start and stop commands. The designer created a wrapper command that is meant to control startup and retries of the main function. The ...
0
votes
0answers
38 views

Why do the shutdown and startup scripts placed at /etc/init.d/ not run on shutting down or during startup?

I basically have a simple script #!/bin/sh sudo echo "process kill" >> /home/logfile placed at etc/init.d/lokill and symbolic links K99lokill to /etc/init.d/lokill placed at /etc/rc0.d and /...
0
votes
1answer
22 views

Why do all the links in /etc/rc6.d start with K if runlevel 6 corresponds to reboot?

I was trying to find out how to run a script at startup and during shutdown during which I got to know that level 6 corresponds to reboot in ubuntu. When I opened the /etc/rc6.d every link's name ...
1
vote
1answer
61 views

Syslog not working if program is started from init.d [closed]

I have a program that needs to run on start up. If i run the script from terminal /etc/init.d/Program_B.sh syslog is working fine. However, the program does NOT log into syslog on boot even though it ...
0
votes
0answers
47 views

Program not working after setting script in init.d

I have two programs that need to run on start up. I am using init.d scripts because the virtual machine in my system does not have systemctl. With my configuration program_A is working but program_B ...
0
votes
2answers
203 views

init.d based on a bash script fails, why? [closed]

I have this init.d script (/etc/init.d/ctrlme): #!/lib/init/init-d-script ### BEGIN INIT INFO # Provides: ctrlme # Required-Start: $local_fs $remote_fs $network # Required-Stop: $...
1
vote
1answer
74 views

SysVinit service wrapper for systemd on arch linux

I'm using Arch Linux and I'd like to use Cisco AnyConnect out of the box. Cisco AnyConnect is delivered as SysVinit service. The installation fails because directories like /etc/rc.d are missing. I ...
1
vote
1answer
68 views

Populate environment in non-interactive session

I'm working on an embedded device that runs Yocto Poky as distro. The final product will have several applications that are started by SysVinit. There is only one root user. I have some scripts, ...
0
votes
1answer
388 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
108 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
26 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
57 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
40 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
92 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
598 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
176 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
570 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
59 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
617 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 ...
2
votes
1answer
52 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
113 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
1answer
454 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
58 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
90 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
51 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? ...
5
votes
3answers
2k 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
50 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 -...
1
vote
1answer
948 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: ...
3
votes
1answer
1k 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
45 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
26 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 ...