Hot answers tagged

4

Some distributions have opted to include compatibility scripts so that old style commands still work. For example, on Debian 8. root@matrix:~# which service /usr/sbin/service root@matrix:~# file /usr/sbin/service /usr/sbin/service: POSIX shell script, ASCII text executable, with very long lines root@matrix:~# grep upstart /usr/sbin/service # Operate ...


3

Thanks to Don Crissti's insights and via process of elimination, it is concluded that the culprit is the initramfs image. Somehow dracut when it builds the image decides to include a cached version of the hostname (!?!). Rebuilding the initrd/initram fs is covered here but in short (since you, dear reader might not have access), do dracut -f -v


2

To set up networking for your chrooted session you need to copy the DNS configuration into the chroot environment : cp /etc/resolv.conf /mnt/etc/resolv.conf Or ln -s /etc/resolv.conf /mnt/etc/resolv.conf


2

According to the systemd.special man-page, you should use Before=poweroff.target. poweroff.target A special target unit for shutting down and powering off the system. Applications wanting to power off the system should start this unit. runlevel0.target is an alias for this target unit, for compatibility with SysV. Additionally, as I mentioned in my ...


1

NOTE- The answer from Argonauts worked with some mods. Here is the working version in my environment based on a standard install: # xymonlaunch.service # systemd file for Fedora 18 and up, or RHEL 7 and up [Unit] Description=Xymon systems and network monitor Documentation=man:xymon(7) man:xymonlaunch(8) man:xymon(1) After=network.target [Install] # ...


1

Some Linux systems will mount partitions as read-only if they were not cleanly unmounted and the system thinks that the appropriate flavor of fsck should be run on it before normal usage. Check your logs or dmesg to find out if this is the case


1

You need to move the line PartOf=app.service out of [Service] and into the [Unit] section, and add to the [Unit] of app.service the list of customers to start, eg Wants=app@customer1.service app@customer2.service or as sourcejedi said in the comments, Requires= the same thing. You can keep the PartOf to stop services you start by hand that are not in ...


1

Digging around in The Source reveals ./src/core/namespace.c: x = strjoin(prefix, "/systemd-private-", sd_id128_to_string(boot_id, bid), "-", id, "-XXXXXX", NULL); which one might eventually chase down as a relation to the mktemp(3) call that creates (a hopefully) unique file that a local attacker with write access to the parent directory will have ...


1

Alternate method: cat /proc/sys/kernel/random/boot_id This version contains some dashes. The formatting of the boot ID output by journalctl contains no dashes.


1

journalctl --list-boots | head -1 | cut -d ' ' -f 3


1

You cannot use shell style >> redirection in ExecStart. You need to get it to run a shell that can do the redirection for you, or set StandardOutput=. For example, try ExecStart=/bin/bash -c 'echo "%i %I" >> /home/vagrant/test.txt'


1

Weird one. I removed all files in the following folders; Nzb, intermediate, queue Restarted the service and that did the trick. No idea why but it's now all working again


1

No. This is one of the fundamental differences between upstart and systemd. upstart is event-based, one of the novel design features that was touted when it was introduced. systemd is not event-based. You'll have to work out what you are using initctl emit for, and determine how to achieve that in the different systemd model.


1

Take a look at https://wiki.archlinux.org/index.php/Dm-crypt/Specialties. You can switch the mkninitcpio encrypt hook for encryptssh and then add some things to your kernel bootline. I'm using the dropbear hook and it works pretty well.



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