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 CompatibilityConditionPathExists=/etc/rc.local[Service]Type=forkingExecStart=/etc/rc.local startTimeoutSec=0StandardOutput=ttyRemainAfterExit=yesSysVStartPriority=99[Install]WantedBy=multi-user.target

And create a file /etc/rc.local

#!/bin/shecho  deadline > /sys/block/sda/queue/scheduler

Enable and start service, then check it status

 

systemctl enable rc.local.servicesystemctl start rc.local.servicesystemctl status rc.local.service

Post: 2017

Views: 889

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