ubuntu 17.04 /etc/rc.local set

Due to systemd , the default /etc/rc.local not exists in ubuntu 17.04 .

 

If you want to make /etc/rc.local execute at the boot time.

You need create a service /etc/systemd/system/rc.local.service

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

And create a file /etc/rc.local

#!/bin/sh
echo  deadline > /sys/block/sda/queue/scheduler

Enable and start service, then check it status

 

systemctl enable rc.local.service

systemctl start rc.local.service

systemctl status rc.local.service

Post: 2017-09-03 11:30:08

Views: 1

Follow me: @twitter @github
Scan QR code and Donate me via alipay:
donate me via alipay
Donate me Bitcoin:136MYemy5QmmBPLBLr1GHZfkES7CsoG4Qh
Powered by GoSense RSS