Tag Info

Hot answers tagged

30

Both upstart and systemd are attempts to solve some of the problems with the limitations of the traditional SysV init system. For example, some services need to start after other services (for example, you can't mount NFS filesystems until the network is running), but the only way in SysV to handle that is to set the links in the rc#.d directory such that ...


26

From man 2 kill: The only signals that can be sent to process ID 1, the init process, are those for which init has explicitly installed signal handlers. This is done to assure the system is not brought down accidentally. That is, it is possible for init to do whatever it likes upon receiving SIGKILL (including exiting), but systemd's init does not ...


24

There are mainly two approaches to do that: If you have to run a script, you don't convert it but rather call the script through a systemd service. Therefore you need two files: the script and the "service" file. Let's say your script is called vgaoff. Place your script in /usr/lib/systemd/scripts, make it executable. Then create a new service file in ...


16

Probably everything you want to know is here on the "Debate Init System To Use" pages that the Debian project put together around making the decision of which initsystem to go with. Within that page is a separate link to each of the choices of initsystems. Debate initsystem upstart Debate initsystem systemd For a primer on Systemd this page has pretty ...


14

Saw systemd mentioned on Arch General ML today. So read up on it. The H Online as ever is a great source for Linux Technology and is where I found my place to start researching Systemd as SysV Init and Upstart alternative. However the H Online article (in this case) isn't a very useful read, the real use behind it is it gives links to the useful reads. The ...


9

There is no real need to disable "extra" TTYs as under systemd gettys are generated on demand: see man systemd-getty-generator for details. Note that, by default, this automatic spawning is done for the VTs up to VT6 only (to mimic traditonal Linux systems). As Lennart says in a blog post1: In order to make things more efficient login prompts are now ...


9

The kernel lists them by name in /sys, both separately in (e.g.) the tree of PCI devices -- although finding them there if you don't know where they are to start with is not simple -- and together via symlinks in /sys/class/net. E.g.: > ls /sys/class/net em1 lo wlp6so Another example: > ls /sys/class/net lo p6s1 wlan0 If you are not sure which is ...


8

I would start with the Systemd manual pages. They represent a comprehensive resource of the system and services. There is also the freedesktop Systemd FAQs.


6

Add After=mysql.service to your service file (or change it to the correct service name), e.g: [Unit] Description=Boardies Email Server Startup Script After=mysql.service [Service] ExecStart=/home/bits/EmailServer/start.email Restart=always [Install] WantedBy=multi-user.target Please note that you don't have to put your service file into ...


6

This is described in the arch wiki: Create a new service file similar to getty@.service by copying it to /etc/systemd/system/ cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service This basically copies the already existing getty@.service to a new file autologin@.service which can be freely modifed. It is copied ...


6

They use insserv by default, which still requires the sysvinit package as of Debian 6.0 (Squeeze). It was originally developed and used in OpenSUSE. Links to discussions and reasons for the change to insserv can be found on the Debian Wiki. There has been much debate over the future of init systems in Debian. The main reason that Debian has not moved on to ...


6

"Closing" a TTY If systemd is not the init being used then this will not help you. sysvinit is no longer supported by Arch Linux systemd's systemctl is used to control all the service units on the system. To learn more about it reference man systemd.unit. Stopping the getty service on the desired tty will perform the task in question. Below is the ...


5

From the systemd page you posted: How do I change the default runlevel? systemd uses symlinks to point to the default runlevel. You have to delete the existing symlink first before creating a new one rm /etc/systemd/system/default.target Switch to runlevel 3 by default ln -sf /lib/systemd/system/multi-user.target ...


5

The dot means there is an ACL (access control list) overriding the usual Unix permission scheme. Here's what mine looks like: $ ls -ld /tmp drwxrwxrwt. 7 root root 4096 Apr 23 22:36 /tmp $ getfacl /tmp getfacl: Removing leading '/' from absolute path names # file: tmp # owner: root # group: root # flags: --t user::rwx group::rwx other::rwx Check your ...


5

See: /lib/systemd/system/systemd-tmpfiles-clean.timer: [Timer] OnBootSec=15min OnUnitActiveSec=1d This runs the corresponding .service file 15 minutes after boot and then every day while the system is up. If you reboot multiple times in the same day, you can just have the backup script check the mtime of the archive and skip that run if it's less than a ...


5

Assuming this isn't a typo, the install section in your typo service file contains a typo. It should be, multi-user.target instead of mulit-user.target (multi vs. multi), e.g: [Install] WantedBy=multi-user.target


5

systemd provides systemd-tmpfiles for this exact purpose. The systemd-tmpfiles service handles the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as /run or /tmp. The configuration of systemd-tmpfiles is described in the manual page of tmpfiles.d1. Create a systemd-tmpfiles ...


5

It was easier than I thought, just installing the systemd-sysv package made all the necessary changes: Breaks: sysvinit-core Description-en: system and service manager - SysV links systemd is a replacement for sysvinit. It is dependency-based and able to read the LSB init script headers in addition to parsing rcN.d links as hints. It ...


4

Not sure if this will help because I did not see any SElinux errors. But I'm posting what worked for me and the problems I encountered in the hope it helps. After installing Fedora 17 I upgrade to the latest release but did not reboot. I did log out and back in because of the updates to several gnome packages. (I did not notice that the update included ...


4

Error 13 is probably system error 13, which means permission denied. $ perror 13 OS error code 13: Permission denied A dot means the file has an SELinux context. GNU coreutils - What information is listed GNU ls uses a ‘.’ character to indicate a file with an SELinux security context, but no other alternate access method. A file with any other ...


4

This was a bug with mysqld starting with systemd when they made a change to use ServicesPrivateTmp for additional security. When you performed a yum update, the mysql package was updated to mysql-5.5.22-1.fc16 or greater which corrected the issue. Bug 815812 Bug 782513 Description of Fedora's implementation of 'PrivateTmp' feature


4

I don't think it's possible to do this entirely in systemd as it does not track any state between reboots. You can easly schedule something to run 10 minutes after boot using systemd.timer and its OnBootSec= or OnStartupSec=. The script itself has to check if it was already run today or not. This can be easily implemented even in bash, for example: ...


4

This is a known issue and several bug reports have been submitted. There is also a workaround for ubuntu, but I don't think it will work for Arch users because they no longer use init scripts. I bet their fix can be ported but I don't know enough about systemd to do it. Here is a solution from the Fedora forums that looks like it works: Right-click on ...


4

systemd has something called 'targets' which can be thought of as the runlevels of init. prefdm.service will be run with the "default.target" which is set by default to "graphical.target". So, by setting the default target to "multi-user.target" (aka. SystemV runlevel 3) you will start all but the X11-server. Your vncserver@:[0-9].service will be unaffected ...


4

[This does not directly address the issue of systemd-tmpfiles but I think you have already recognized that in this particular case you are better off just using echo.] First up, "multi-user.target" may or may not be what you want to use. If you are familiar with the concept of runlevels from SysV style init stuff, multi-user is the systemd equivalent of ...


4

From systemd v197 predictable network names were introduced. With systemd 197 we have added native support for a number of different naming policies into systemd/udevd proper and made a scheme similar to biosdevname's (but generally more powerful, and closer to kernel-internal device identification schemes) the default.1 You can use ip link to show all ...


4

I believe it's the deallocvt command you're looking for. First make sure the VT is no longer used. For instance, if there's a getty started with respawning by init on that console, there's no point trying to deallocate it, you'd need to remove that tty from the inittab first and tell init to reload its config. If there's a shell, exit the shell, etc.


4

There are a couple of examples on the Arch Wiki systemd page. Basically, it involves creating a service file for your screen locker and ensuring it is hooked to either the suspend, hibernate or sleep targets. If you use a simple screen locker like slock, your file would look like this: [Unit] Description=Lock the screen on resume from suspend [Service] ...


4

The main practical implementation is that descendants of the window manager will inherit the environment variables of the window manager. This is helpful for dealing with cryptographic key agents such as gpg-agent or ssh-agent where the login manager starts up the agents so the window manager and its descendants inherit the SSH_AGENT_PID and SSH_AUTH_SOCK ...



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