Questions tagged [sysvinit]
SysVinit is a set of programs and scripts that control the startup, running and shutdown of all other programs.
282
questions
1
vote
0
answers
19
views
Manual removal of Nvidia driver fails due to init and busybox
I'm using PorteuX (Slackware based) and in the shutdown/reboot process I want to unmount everything, which works fine unless I boot with Nvidia drivers. In this case, just before reboot -f step if I ...
4
votes
2
answers
309
views
ssh connection hangs on server shutdown / restart
When I shut down or restart my server while logged in via SSH, the SSH connection hangs or freezes. The terminal becomes completely unresponsive, and it takes up to one minute for the SSH session to ...
0
votes
0
answers
61
views
init.d service working directory in OpenWrt
Got an issue. I've written a simple C program that invokes certain shell script in randomized intervals - before it has been run as a cron task, but since there were many clients and each one run ...
1
vote
0
answers
354
views
How to start and manage a process in busybox inittab, and rcS as early as possible?
I am working on an embedded Linux system where busybox is being used as init.
I have 2 requirements on running my application.
My application needs to start as early as possible;
It needs to be ...
0
votes
1
answer
129
views
Stop not called for init rc.d service
I have a very simple SysVinit service in /etc/rc.d:
#!/bin/bash
PIDFILE="/var/run/test.pid"
status() {
if [ -f "$PIDFILE" ]; then
echo 'Service running'
return 1
fi
...
1
vote
0
answers
145
views
init.d script for a foreground program
I have to write a portal init.d script for a program that runs on foreground (no daemon option; no pidfile option) and logs to stdout/stderr.
The program should log into syslog service. The program ...
0
votes
0
answers
53
views
Systemd & SysV init scripts
Good day,
I have spent days reviewing a problem related to the operation of the services in Systemd and the SysV scripts, but I have not obtained a resolution to my question in the documentation.
The ...
1
vote
1
answer
145
views
Application does not start from inittab
I am trying to launch an application via inittab in an embedded system. The desire to do this via inittab rather than through an init.d script is to avail of respawn. There is no systemd on this ...
0
votes
0
answers
172
views
systemd service
I'm wondering how services launched by means of systemd working.
When system was running by means of System V init, there was scripts under runlevels (/etc/rc"level".d/) which described ...
0
votes
1
answer
52
views
Does init script support something like systemd user service?
In recent Linux distributions, systemd has replaced the traditional /etc/init.d scripts. And it can support user services
systemctl --user start my.service
I wonder if we can do similar things with ...
0
votes
1
answer
963
views
Autostart services in System V system
In systemD, we need to execute this command to autostart an application on system startup: sudo systemctl enable <service-name>. What will be the equivalent command for sysvinit since chkconfig ...
0
votes
0
answers
72
views
Script doesn't act the same when executed alone and through /etc/init.d
I'm struggling a lot with a script behavior i'm unable to understand.
I have a script that is being called in a process i created in the init.d folder.
So at startup the script is executed but there ...
2
votes
1
answer
2k
views
what is the difference between systemd's service and service and daemon and systemd files and systemd unit files?
I am new to systemd fundamentals. I read sth about systemd units and unit files and services. Would someone please define these three terms for me clearly ? I'm mixed up .Also what is a daemon ? is ...
1
vote
1
answer
70
views
Where is `service status service-name` getting the log print outs from?
with sudo service ssh status we get an output of logs, such as
Jul 16 07:35:50 Linux sshd[1426235]: Disconnected from invalid user root 111.111.111.111 port 59242 [preauth]
Jul 16 07:38:50 Linux sshd[...
1
vote
0
answers
360
views
For automatic startup is it enough to copy script to /etc/rc.d folders?
we have installed some tool on RedHat linux 8.5 which comes with a README file that explains steps we should do, in order to enable automatic startup:
Copy the 'accurev' script to the /etc/rc.d/init....
1
vote
0
answers
154
views
whoami command fails after running /bin/su
I have a system with an init script that launches multiple applications, each under it's right user and group. The init script checks the home directory of each user and looks for the application init ...
0
votes
1
answer
438
views
Auto detect network interface card, network init.d
I have build my LFS linux that based in this book, it's working fine and network interface card is working. Even it's configuring IP automatically with using dhcpcd service.
According chapter 9 in ...
0
votes
1
answer
799
views
Why does this init.d script sometimes not run at shutdown?
I'm on Debian 10 Buster.
I can't figure out what's wrong with this init.d script? Sometimes it doesn't run at server shutdown.
My MySQL error_log fills up with "Status information" when the ...
0
votes
1
answer
511
views
Make init.d service wait for mount via systemd-logic
I have a systemd-based distribution (debian 10) with a legacy init.d-service (backuppc). As the backup is stored on an external drive, I'd like to ensure that the backup service does not run before ...
0
votes
2
answers
1k
views
Reboot does not send "stop" to init.d scripts
I have a script that I want to execute before a machine is either shut down or rebooted but it's only triggered with the start parameter, never with the stop parameter and it's driving me crazy.
...
0
votes
1
answer
8k
views
How to enable/disable/start/stop services in sysVinit?
I'm using devuan distro with sysVinit as init system. Before i was in debian using systemd.
Like for making service for emacs server on boot, in systemd i used to make folder as
~/.config/systemd/user/...
0
votes
3
answers
1k
views
Enable libvirt using sysvinit
I am trying to install qemu and KVM on my MX-Linux 21, however my system is booted with sysvinit. As all the articles regarding installing and setting KVM use systemctl, I cannot find one to enable ...
0
votes
0
answers
314
views
Use Docker on a systemd disabled VM
I am provided by a VM running Ubuntu 18.04.5 LTS which has systemd disabled.
I have root access on it.
I am trying to run docker on it which is installed but I get error Cannot connect to the Docker ...
0
votes
0
answers
1k
views
Unable to start (SysV init) script with systemd service in RHEL 8.2
I'm facing an issue where ExecStart of a SysV init script is failing in RHEL 8.2. I don't have this issue in RHEL 7.9 with the exact same init script and service unit setup. Went through quite a bit ...
0
votes
2
answers
223
views
Cannot connect to postgresql database from init.d script (Debian)
A script that runs just fine normally fails when put into an /etc/init.d/ script (consolenew), to activate at bootup.
Specifically, it cannot open the PostgreSQL database, giving the error: could not ...
0
votes
1
answer
896
views
Change init program location in linux
In the linux kernel I found the following lines in the main.c file:
if (!try_to_run_init_process("/sbin/init") ||
!try_to_run_init_process("/etc/init") ||
!...
0
votes
0
answers
146
views
SysVinit service runs differently from the script itself
I'm using Linux Deploy on Android and trying to create a service for SysVinit. The distribution I use is Debian buster. I wrote the following script. The problem is: when running it as a script itself,...
0
votes
1
answer
1k
views
Remove folder at shutdown or reboot
I have a folder /mnt/automounts which is used to automount usb drives in (which is working.). There is one scenario that still causes an issue. When a usb drive is plugged in, then the system is shut ...
7
votes
2
answers
3k
views
Repairing a failed Debian upgrade
I was attempting to upgrade from debian 9 to 10 but the installation failed when attempting to install systemd-sysv_241-7~deb10u6_amd64.deb. I get the following error:
My attempts to run apt --fix-...
0
votes
1
answer
541
views
CentOS: Add init script to all default runlevels
How can I add specific init script exists in /etc/init.d/init_script to all default runlevels?
In debian based distros, this can be achieved by
sudo update-rc.d init_script defaults
But in CentOS, ...
2
votes
1
answer
698
views
What's the point of a daemon detaching itself from controlling terminal if the terminal can never be closed?
All sources I've read about writing a daemon say that daemons should detach themselves from controlling terminal so that if the terminal is closed, the daemon won't get SIGHUP.
But daemons are always ...
2
votes
1
answer
3k
views
Nessus 8.13 Install on Kali or Ubuntu: /etc/init.d/nessusd: command not found
I really need some help with this issue I am having. I am trying to install Nessus scanner on either my Kali 2020.2 or Ubuntu 20.04 LTS VMs on Virtual Box. Granted I have tried this install on both ...
0
votes
0
answers
147
views
How to handle this delay on boot time?
friends! Happy New 2021 Year here!
I use Devuan with SysVinit, because I want to speedup my system and get unnecessary non-free stuff away as possible, but also I need Debian-like distribution cause ...
0
votes
0
answers
23
views
How to make sure OpenVPN stays connected? [duplicate]
I followed some instructions from here to connect to a VPN on startup, however, every few months something goes awry and I find myself not connected to the VPN.
How can I kill the internet if it can't ...
0
votes
1
answer
670
views
Ubuntu "service" command stuck, can't reload services
Using Ubuntu 16.04.6 LTS, it is not possible to call the service command to modify the status of any /etc/init/ services.
The command starts but is stuck in execution.
The services themselves are ...
-2
votes
2
answers
111
views
Is Removing vsftpd & ssh from init.d safe?
Everytime my system boot up, the ssh and ftp services are automatically start, is removing them from the init.d (init process) will solve my problem ? And is it safe ?
4
votes
2
answers
8k
views
systemd -- su: Permission denied, in /etc/init.d scripts
We are migrating from RHEL6 to RHEL8
and I would like to retain the old /etc/init.d scripts,
since we have a ton of applications that would otherwise
need be rewritten and tested.
For many init-...
1
vote
0
answers
593
views
Initializing framebuffer device without udev
I am trying to reduce boot time in a Raspberry Pi 4 using Yocto Linux. The system uses SysV init.
There is psplash that uses framebuffer, and Qt application that uses DRM/eglfs, displayed ...
2
votes
1
answer
2k
views
what is apache-htcacheclean for, and why is it in /etc/init.d/
I have installed apache2 package in Debian. In addition to the startup script /etc/init.d/apache2, there is also another one:
/etc/init.d/apache-htcacheclean
What is the purpose of this script? The ...
0
votes
2
answers
2k
views
How to start a script on boot in Debian?
I have a script inside of /etc/init.d/wifi and I want to start it on boot. I first gave it permissions by running sudo chmod 755 wifi, then I ran sudo update-rc.d wifi defaults. Finally, I enabled it ...
0
votes
0
answers
556
views
Unable to move shell schript to init.d, is in read only file-system on an embedded linux
When I do
cp run-rfid-script.sh /init.d
I get this error message
cp: can't create '/init.d': Read-only file system
How can I overcome this problem?
Other info on what I am doing
I have a shell ...
1
vote
0
answers
67
views
What's causing initctl stop to fail?
I have an upstart process which terminates all child processes during post-stop:
post-stop exec killall my-process & exec sleep 10
This works as expected, however I'm unsure of the following two ...
1
vote
1
answer
364
views
Convert SysV init run level S to Systemd *.target (Debian)
I am converting a SysV init style file to Systemd Unit file and it's init section block looks like this:
### BEGIN INIT INFO
# Provides: ifcheck
# Required-Start: $local_fs
# Required-...
0
votes
3
answers
58
views
How does Linux know what function to choose in rcX.d directory?
For example, I have the following script:
...
start(){
echo "Starting..."
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
...
0
votes
1
answer
16
views
Disable program from starting at boot on cent6, mounted filesystem
I am mounting a filesystem with guestfish. It is a Cent6 machine. I want to be sure that it is not going to start http on boot. I can't chmod -x /etc/rc.d/init.d/http, so I've opted to:
mv /etc/rc.d/...
0
votes
2
answers
438
views
RHEL6 SysV to RHEL7 systemd script for LibreOffice headless server
I had to adjust a script from an "old" RHEL6 SysV script to a "new" RHEL7 systemd script. I can do the systemd script for LibreOffice no problem, but when I try to had Xvfb (mandatory for users with a ...
1
vote
0
answers
582
views
ffmpeg streaming runs ineeficiently when started via init.d startup script
I'm using ffmpeg to stream video/audio on raspberry pi 4, using the following command
ffmpeg -re -f v4l2 -input_format h264 -thread_queue_size 512 -i ${video_device} -re -f alsa -thread_queue_size ...
0
votes
1
answer
355
views
Required display service (X server) for Debian init script [duplicate]
I'm on Debian 9.11 with the MATE desktop (pinebook pro)
I've an Init script /etc/init.d/customMapping that remaps some of my keys using both setxkbmap and xmodmap. Here it is
#! /bin/sh
### BEGIN ...
1
vote
1
answer
2k
views
AIX and daemon service
I see that the daemon service is started and stopped via the commands:
startsrc and stopsrc on group/subsystem.
I have init.d script and I want to make it daemon service in AIX.
From these commands ...
0
votes
0
answers
158
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 ...