2

I want to run a command or script as root while booting, like just before login. I have tried the solution i used until 17.10, but after a fresh install of 18.04, I no longer have an /etc/rc.local. The command is hdparm -y /dev/sdc to put that drive into sleep, but it only works with root.

Thanks for any help.

1 Answers1

1

You can just create the file /etc/rc.local and make it executable, then put this in it:

#!/bin/sh
hdparm -y /dev/sdc
Sebastian Stark
  • 6,122
  • 19
  • 48