Run BASH and command on boot

Forum rules
Before you post please read this

Run BASH and command on boot

Postby raddatzjos on Sat Dec 10, 2011 3:30 am

I'm running Mint 11 on a laptop with a temperature sensor issue. Linux doesn't always read the sensor and outputs out a value of 0 Celsius, and thus it will never turn the fans on. Normally this would be a problem, but a quick restart usually fixes the problem and the fan will turn on as needed because it's properly reading the data.

Now that you have some relevant information, is there a way to open a terminal and have it run the sensors command every time I start my laptop? I would like to do this because once I know the sensor isn't reading 0, I know it will work at least until I shut down my laptop again. If someone knows of a simpler method, that would be appreciated too. And finally, if this is miscategorized, I'm sorry.
raddatzjos
Level 1
Level 1
 
Posts: 3
Joined: Sat Dec 10, 2011 3:20 am

Linux Mint is funded by ads and donations.
 

Re: Run BASH and command on boot

Postby thaimann on Sat Dec 10, 2011 10:48 am

I think Anacron can do this. It's an updated version of cron.

TH
thaimann
Level 1
Level 1
 
Posts: 27
Joined: Thu Aug 18, 2011 9:36 am

Re: Run BASH and command on boot

Postby chammer on Tue Dec 13, 2011 8:20 am

In some distributions there's an local or local.start script under /etc/default, /etc/conf.d, or /etc/init.d. However, after a bit of searching I was unable to locate one in Mint. However, this should set you on the right track of making your own: https://help.ubuntu.com/community/RcLocalHowto
chammer
Level 1
Level 1
 
Posts: 3
Joined: Sun Dec 11, 2011 10:06 pm

Re: Run BASH and command on boot

Postby awi on Mon Dec 26, 2011 6:58 pm

Yo can use

Code: Select all
 /etc/rc.local


Linux Mint 12 default looks like these
Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0
awi
Level 1
Level 1
 
Posts: 13
Joined: Wed Nov 23, 2011 8:23 pm
Location: Asunción, Paraguay


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 4 guests