VectorLinux
October 02, 2014, 12:12:44 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: [SOLVED] rc.local  (Read 1957 times)
retired1af
Packager
Vectorian
****
Posts: 1263



« on: July 11, 2007, 03:22:44 am »

Someone really needs to take away my keys first thing in the morning.

Was playing around with the Folding@Home client for linux, and decided I wanted to run it as a service. No problem sez I. Just slap the appropriate command at the end of rc.local and let 'er rip. Riiiiiiiiight... Silly me, I forgot to close off the file properly (I use fi, right?) and now when I boot, it launches the folding client, and stays there. It doesn't boot into X and KDE. Is there a way to bypass/cancel or have I really borked it and now need to reinstall?
« Last Edit: July 11, 2007, 05:41:25 am by retired1af » Logged

ASUS K73 Intel i3 Dual Core 2.3GHz
The Headacher
Louder than you
Global Moderator
Vectorian
*****
Posts: 1548


I like the bass to go BOOM!


WWW
« Reply #1 on: July 11, 2007, 03:28:27 am »

You could just put a default rc.local back if you boot a livecd.

Code:
#!/bin/sh
# rc.local
# This file is provided for custom initialisation because
# Admin is not encouraged to touch rc.S or rc.M.
#
# This file is launched on the end of entering multi user mode (2-5)

# Setting up Linux logo text
if [ "$INSTALL_DATE" ]; then
   linux_logo -c -t "Operating since $INSTALL_DATE" > /etc/issue
else
   linux_logo -c -t "Brought to you by Vector-Linux" > /etc/issue
fi

## Setting up remote login message
echo "Welcome to $HOSTNAME. Unauthorized access is prohibited !" > /etc/issue.net

## Setting login message
if [ -f /etc/vector-version ]; then
    echo "`head -n1 /etc/vector-version` on `uname -a | cut -d\  -f1,3`" > /etc/motd
else
    echo "Vector Linux on `uname -a | cut -d\  -f1,3`" > /etc/motd
fi

## Vector Linux initialisation is very fast ...
## So uncomment this if you want to enjoy the show a bit longer
#sleep 5
iface=`ifconfig |cut -d " " -f 1|grep -v lo`
if [ "x$iface" == "x" ];then
  for i in 0 1 2 3 4; do
  if [ -x /etc/rc.d/rc.inet$i ]; then
    /etc/rc.d/rc.inet$i start
  fi
done
fi
## You may add custom initialisation below this

Logged

Most music on my soundcloud page was arranged in programs running on VL.
retired1af
Packager
Vectorian
****
Posts: 1263



« Reply #2 on: July 11, 2007, 03:32:13 am »

Hmmmm.. Yeah, if I had one...  Cheesy I'll go out and snag one and fix it that way. No way to get around it otherwise?
Logged

ASUS K73 Intel i3 Dual Core 2.3GHz
retired1af
Packager
Vectorian
****
Posts: 1263



« Reply #3 on: July 11, 2007, 05:27:15 am »

OK.. Where did I go wrong here? This is the line I added to rc.local...

sudo -u retired1af sh -c "cd /home/retired1af/Folding; ./start"

Start is the script file I created to start the client.

#!/bin/bash
./FAH504-Linux.exe
Logged

ASUS K73 Intel i3 Dual Core 2.3GHz
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #4 on: July 11, 2007, 05:32:04 am »

not sure but maybe you need to start it in the background

Code:
sudo -u retired1af sh -c "cd /home/retired1af/Folding; ./start &"
Logged
retired1af
Packager
Vectorian
****
Posts: 1263



« Reply #5 on: July 11, 2007, 05:37:05 am »

BINGO!!!! Thanks! I knew there was a switch that I needed to use, but couldn't remember what it was. Off to give it a shot..

(Oh, and kudos to the Live CD team... That really saved my bacon this time!)

Edit -- Worked like a charm.. Thanks!
« Last Edit: July 11, 2007, 05:40:59 am by retired1af » Logged

ASUS K73 Intel i3 Dual Core 2.3GHz
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!