When I type init 3, nothing happens. systemctl isolate multi-user.target brings me to console mode. Do you know this behavior?
(https://i.ibb.co/1GCNYLLr/2025-09-14-19-25.png) (https://ibb.co/v4NWCHH3)
Yes, here's the reason.
With systemd 258~rc1-1, support for user command for runlevel and runlevel targets (init 0 to init 6) has been removed.
The change is not user-friendly from systemd and is also irrelevant in terms of the code saved.
I now use a script called "onoff" in the /usr/sbin directory to replace the long systemd command.
#!/usr/bin/bash
#
# Name: /usr/sbin/onoff
#
# This script makes the functionality removed by systemd 258~rc1-1,
# init 0 to init 6, available again to the user in a running system.
case "${1}" in
0)
systemctl poweroff
;;
1)
systemctl isolate emergency.target
;;
2)
systemctl isolate rescue.target
;;
3|4)
systemctl isolate multi-user.target
;;
5)
systemctl isolate graphical.target
;;
6)
systemctl reboot
;;
*)
echo "Error: >${1}< is not a valid option" && exit 1
;;
esac
exit 0
After that, you can use the command
onoff 6 to reboot, or onoff [2-5] to switch to another target, or onoff 0 to shutdown.
We will discuss within the team whether to include this script in our siduction-scripts package.
Ahh... thank you for the explanation @scholle1!
Quote from: scholle1 on 2025/09/14, 20:25:59
We will discuss within the team whether to include this script in our siduction-scripts package.
Great idea 8)!
[Thanks to @scholle1: Simple, but very effective and nice to have!]
+1 :)
+ 1 ;)
Kann man das script nicht "init" taufen? Dann ändert sich nichts. 8)
And what is the way of working for a Siduction update ?
In the manual is init 3 mentioned.
Quote from: helux on 2025/09/16, 11:34:52
Kann man das script nicht "init" taufen? Dann ändert sich nichts. 8)
Nein, leider nicht.
Das ist ja die verrückte Situation mit systemd. systemd benötigt selbst den Befehl
init.
init ist ein Link auf
../lib/systemd/systemd.
$ readlink /usr/sbin/init
../lib/systemd/systemdWährend des Bootvorgangs wird
init mit
PID 1 aufgerufen und an systemd weitergeleitet.
Im Code von systemd ist die Übersetzung der Initbefehle weiterhin vorhanden.
Das kannst du testen indem du an die Kernelbefehlszeile " 3" anhängst. Du landest dann auf TTY
und nicht in der graphischen Oberfläche.
Lediglich die Unterstützung des Aufrufs von
init mit einer Benutzer PID wurde entfernt und
zusätzlich auch das Paket telinit.
QuoteLediglich die Unterstützung des Aufrufs von init mit einer Benutzer PID wurde entfernt und
zusätzlich auch das Paket telinit.
Ist das dann nicht auch die (Teil-)Lösung? telinit -> "neues" Skript mit wiedereingeführtem "telinit"; Handbuch ändern auf "telinit 3".
Quote from: deathwalker on 2025/09/19, 08:10:15
And what is the way of working for a Siduction update ?
In the manual is init 3 mentioned.
The online manual has just been updated.
https://manual.siduction.org/index_en.html (https://manual.siduction.org/index_en.html)
Quote from: ro_sid on 2025/09/19, 14:08:02
QuoteLediglich die Unterstützung des Aufrufs von init mit einer Benutzer PID wurde entfernt und
zusätzlich auch das Paket telinit.
Ist das dann nicht auch die (Teil-)Lösung? telinit -> "neues" Skript mit wiedereingeführtem "telinit"; Handbuch ändern auf "telinit 3".
telinit ist Teil von sysvinit-core und wegen Konflikten nicht mehr installierbar.
apt why-not sysvinit-core
sysvinit-core:amd64 is not selected for install because:
1. systemd-sysv:amd64 is selected for install
2. systemd-sysv:amd64 is available in version 258~rc4-1
3. sysvinit-core:amd64 Kollidiert mit systemd-sysv-----------
edit 2025-09-22:
Befehl
apt why-not sysvinit-corestatt
apt-get -s install sysvinit-core
@scholle1 thanks for your script as it's useful for translating the oldstyle SysV runlevels to the targets in systemd and making it easy as it was before to switch "runlevels" as now known as systemd targets (even though now the concept of runlevels are now all but deprecated).