Tag Info

Hot answers tagged

4

You can run Debian Jessie without running systemd. On upgrades, just make sure sysvinit-core remains installed (see the release notes for details; they specifically address LXC concerns which are similar to yours on OpenVZ). On new installs, see https://wiki.debian.org/systemd#Installing_without_systemd for instructions. libsystemd0 provides systemd support ...


4

To keep your system time synchcronised with a remote server, under systemd as of version 213 (note: you must be using systemd-networkd to manage your network connectivity) you would use systemd-timesyncd. To start and enable this service, run: timedatectl set-ntp true You can set the time with: timedatectl set-time $current_time See man timedatectl ...


3

You currently can't, not all properties are settable, but it's on the TODO list to fix this. here: * allow implementation of InaccessibleDirectories=/ plus ReadOnlyDirectories=... for whitelisting files for a service. and here: * document: ... - document in wiki how to map ical recurrence events to systemd timer unit calendar specifications ...


3

You should be able to use the WorkingDirectory=/usr/local to get your script to execute there.


3

Something simple like: xterm -T xnotconsole -e journalctl -f ought to work. -T sets the window title. You can of course add in things like -geometry to set its size (put all xterm options before the -e). And you could add in journalctl options to filter the messages you want, change the output format, etc. Though xconsole works on my Debian systemd box. ...


3

First, the ability to use strings stems from a mere coincidence in that journald does not compress small (below 64KiB in current implementation) fields. This is not a supported way to read journals, and in the archwiki it really should be marked as such. It is more of a last-ditch recovery method. Now on to the question. From journalctl(1): -D DIR, ...


3

You seem to confuse enable, start and mask operations. systemctl start, systemctl stop: starts (stops) the unit in question immediately; systemctl enable, systemctl disable: marks (unmarks) the unit for autostart at boot time (in a unit-specific manner, described in its [Install] section); systemctl mask, systemctl unmask: disallows (allows) all and any ...


3

readiness protocol mismatch As Wieland implied, the Type of the service is important. That setting denotes what readiness protocol systemd expects the service to speak. A simple service is assumed to be immediately ready. A forking service is taken to be ready after its initial process forks a child and then exits. A dbus service is taken to be ready ...


2

systemd does its own interpretation of values of Exec and other keys. Therefore, you shouldn't write as if this is going to be passed to sh -c or something like that. In particular, if you want to treat a set of words as a single argument, quote it as you normally would, and don't escape the quotes. Consider this example from the systemd docs: Example: ...


2

You need to create two files: one for service, other for timer with same name. example: /etc/systemd/system/test.service [Unit] Description=test job [Service] Type=oneshot ExecStart=/tmp/1.sh /etc/systemd/system/test.timer [Unit] Description=test [Timer] Persistent=true OnUnitActiveSec=10s OnBootSec=10s [Install] WantedBy=timers.target after that ...


2

Not sure if this is a suitable solution for you, but chattr +i /etc/resolv.conf makes the file immutable, hence preventing anyone from modifying it -- even root.


1

I have a Python script that forks when it launches, and is responsible for starting a bunch of other processes. Which indicates that you are doing it wrongly. More in this in a moment. when the script exits the child processes are orphaned and continue to run. This is not correct dæmon behaviour. If the "main" process — in this case ...


1

The solution is fairly easy, just replace auto to allow-hotplug. So I ended up with this: allow-hotplug lo iface lo inet loopback allow-hotplug wlan0 iface wlan0 inet static address 192.168.150.1 netmask 255.255.255.0 allow-hotplug eth1 iface eth1 inet manual up ifconfig $IFACE ...


1

The answer turns out to be quite simple. I just "escape" the parameterization by doubling up the percent signs: Environment="LOG_FORMAT='\"%{X-Forwarded-For}i\" %%u %%t \"%%r\" %%s %%b \"%{Referer}i\ %{User-agent}i\"'" systemd's parameter expansion turns %% into %, which means that my program sees %%u as %u and things work as I want. This is in the ...


1

I am not sure, which version/flavor of Linux you are using, but looks like ACL's for sound devices are controlled by ConsoleKit via udev rules. On my Debian host, I see something like below in /lib/udev/rules.d/70-udev-acl.rules # sound devices SUBSYSTEM=="sound", TAG+="udev-acl" I would play with untagging this, so consolekit won't add sound devices into ...


1

Well, as current I mean active Display of a XOrg Server. Remember that we can have more than one XOrg Server running and they can be multi-head, what make the things harder to manipulate. The other important note is that the DISPLAY variable in some cases cannot be accessed (eg. systemd). After some discussion in commandlinefu, I got this result: for p in ...


1

You may try to use loginctl list-sessions to get the list of sessions, and then use loginctl show-session -p Display -p Active <session ID> on each of these to get the X11 display number associated with the currently active session. Something like this (in bash): TARGET_DISPLAY=() while read id uid user seat; do while IFS='=' read property value; ...


1

This is the default (and the only) behavior. It is not explicitly documented, but is implied by systemd's operation logic. systemd.timer(5) reads: For each timer file, a matching unit file must exist, describing the unit to activate when the timer elapses. systemd(1), in turn, describes the concept of unit states and transitions between them: ...


1

Yes there is, quoting the relevant section of the man page for system.unit: WantedBy=, RequiredBy= This option may be used more than once, or a space-separated list of unit names may be given. A symbolic link is created in the .wants/ or .requires/ directory of each of the listed units when this unit is installed by systemctl enable. This has the ...


1

You are missing the systemd unit files alsa-store.service and alsa-restore.service which are responsible for saving volume settings before shutdown/reboot and respectively restoring those settings at start-up. They're part of alsa-utils. They are both "static" services (they're controlled automatically) so all you have to do is install alsa-utils: pacman -S ...


1

It seems that any interactive script launched from rc.local will have similar issues with stdin. I found a workaround on superuser: Just launch your script using openvt -s -w /path/to/script.sh (explanation at the original post)


1

The console is not connected to stdin of the whiptail process. It looks like the same issue as seen in rc.local with read will not echo key strokes. The suggested answer there is to add plymouth quit before attempting console input. Alternatively, it may be possible to arrange for Plymouth itself to display your warning; something like plymouth ...


1

From the "Command lines" section in systemd.service(5): Note that the first argument (i.e. the program to execute) may not be a variable. I was going to suggest using the instance specifier %i (you can read more about it in systemd.unit(5)), but (now we're back in systemd.service(5)): the first argument of the command line (i.e. the program to ...


1

rename /bin/umount to /bin/umount.real Write a script which runs the commands you want to call before unmounting and then call /bin/umount.real create a soft link to your script as /bin/umount


1

Tinc should be updated as a systemd unit instead of sending direct signals. To achieve this one needs to configure their unit files to be chained with the appropriate Require=, Before=, and After= lines in the [Unit] section. Also ensure that you set the correct WantedBy= for network services. (ie. WantedBy= { network.target, network-online.target, ...


1

Make a wrapper for process which I capture their standard output and pump to the journal via syslog. Such wrapper already exists and is called systemd-cat. You may use it as follows: systemd-cat -t app1 /home/myself/logtest/app1 & systemd-cat -t app2 /home/myself/logtest/app2 & The argument to -t is an arbitrary identification string, ...


1

You could use systemd's generator interface. Basically, it creates service files on the fly upon start or reload. We have a range of machines (called "dema" plus some number) in our cluster, which all export the same directory (their physical disk). I used the generator interface to create one .mount and one .automount file for each machine: #!/bin/sh ...



Only top voted, non community-wiki answers of a minimum length are eligible