我在raspbian安装中将init系统从sysvinit更改为systemd。安装可以正常启动,但是现在在启动时启动lightdm。我不希望它那样做。
我注意到lightdm.service
启动时已启动。通过以下方式停止服务
systemctl stop lightdm.service
工作良好。
systemctl disable lightdm.service
应该禁用它,但是给我
Failed to issue method call: No such file or directory
systemctl status lightdm.service
给我
lightdm.service - LSB: Light Display Manager
Loaded: loaded (/etc/init.d/lightdm)
Active: inactive (dead) since Thu, 03 Jul 2014 09:33:00 +0000; 22min ago
Process: 762 ExecStop=/etc/init.d/lightdm stop (code=exited, status=0/SUCCESS)
Process: 411 ExecStart=/etc/init.d/lightdm start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/lightdm.service
我假设lightdm是从init.d脚本而不是systemd脚本启动的,并且systemctl disable
如果源是init.d脚本则无法使用。我应该怎么做才能在启动时禁用lightdm?
编辑:更多信息
输出$ ls -l /etc/systemd/system
:
total 20
lrwxrwxrwx 1 root root 42 Jul 3 09:04 dbus-fi.epitest.hostap.WPASupplicant.service -> /lib/systemd/system/wpa_supplicant.service
lrwxrwxrwx 1 root root 37 Jul 3 13:03 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x 2 root root 4096 Jul 3 09:00 getty.target.wants
drwxr-xr-x 2 root root 4096 Jul 3 09:04 graphical.target.wants
drwxr-xr-x 2 root root 4096 Oct 11 2013 local-fs.target.wants
drwxr-xr-x 2 root root 4096 Jul 3 09:04 multi-user.target.wants
drwxr-xr-x 2 root root 4096 Oct 11 2013 sysinit.target.wants
lrwxrwxrwx 1 root root 35 Mar 20 2013 syslog.service -> /lib/systemd/system/rsyslog.service
输出systemctl --all -t target
:
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
all.target error inactive dead all.target
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
emergency.target loaded inactive dead Emergency Mode
final.target loaded inactive dead Final Step
getty.target loaded active active Login Prompts
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
multi-user.target loaded active active Multi-User
network.target loaded inactive dead Network
nss-lookup.target loaded inactive dead Name Lookups
remote-fs.target loaded active active Remote File Systems
rescue.target loaded inactive dead Rescue Mode
shutdown.target loaded inactive dead Shutdown
sockets.target loaded active active Sockets
sound.target loaded active active Sound Card
swap.target loaded active active Swap
sysinit.target loaded active active System Initialization
syslog.target loaded active active Syslog
time-sync.target loaded inactive dead System Time Synchronized
umount.target loaded inactive dead Unmount All Filesystems
输出ls -l /etc/systemd/system/multi-user.target.wants/
:
total 8
drwxr-xr-x 2 root root 4096 Jul 3 09:04 .
drwxr-xr-x 7 root root 4096 Jul 3 13:03 ..
lrwxrwxrwx 1 root root 36 Oct 11 2013 remote-fs.target -> /lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 33 Jul 3 09:04 rsync.service -> /lib/systemd/system/rsync.service
lrwxrwxrwx 1 root root 35 Mar 20 2013 rsyslog.service -> /lib/systemd/system/rsyslog.service
lrwxrwxrwx 1 root root 32 Jul 3 09:04 sudo.service -> /lib/systemd/system/sudo.service
lrwxrwxrwx 1 root root 42 Jul 3 09:04 wpa_supplicant.service -> /lib/systemd/system/wpa_supplicant.service