2

I try to run a script (tpfand) at startup, and it asked to be root to execute it.

This is a script to control the fans on Thinkpad computers.

Despite several attempts, I could not get ...

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Pierre
  • 71
  • 2
  • 3
  • 1
    [Have a look here, a blog post describing how to write service files](http://patrakov.blogspot.de/2011/01/writing-systemd-service-files.html) for [`systemd`](http://en.wikipedia.org/wiki/Systemd). No idea why it shouldn't have one included already, though. ([...or use this one](https://bugs.launchpad.net/tp-fan/+bug/776547)) – sr_ May 06 '12 at 12:35
  • Fedora 15/16 support ended ~3 years ago. – Valentin Bajrami Aug 14 '14 at 07:28

1 Answers1

5

The classic place to put one-off stuff like this was rc.local.

From the Fedora 16 release notes:

The /etc/rc.d/rc.local local customization script is no longer included by default. Administrators who need this functionality merely have to create this file, make it executable, and it will run on boot.

I'd say create /etc/rc.d/rc.local like this:

#!/bin/sh
/path/to/tpfand

and chmod +x /etc/rc.d/rc.local and you should be good to go.

ckhan
  • 4,132
  • 22
  • 21
  • It doesn't work...., un don't underwtand why... Maybe the tpfand works diferently – Pierre May 13 '12 at 12:51
  • Can you confirm that just running `/etc/rc.d/rc.local` directly from command line does the right thing? – ckhan May 20 '12 at 15:04