Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Apr 09, 2010 5:44 pm 
Offline

Joined: Fri Apr 09, 2010 5:39 pm
Posts: 1
New user of linode here, so be gentle. Does StackScript send it's output to any log flies? Or can you set something to log what happens? I'd like to have all the standard output saved to a file so I can see what happened.


Top
   
 Post subject:
PostPosted: Fri Apr 09, 2010 8:46 pm 
Offline
Junior Member

Joined: Wed Sep 03, 2008 9:51 am
Posts: 25
Output from your script is sent to the console. Use lish to connect before booting. Optionally, use the script command on a Linux box just before connecting to lish, and you'll have a logfile on the local machine.


Top
   
 Post subject:
PostPosted: Sat Apr 10, 2010 9:43 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
The script that is run is just a regular script run by whatever you put in the shebang. Under bash or anything else, you can just use "tee" to print something to the console as well as a file.

Or, if you don't care about stdout going to the console, you can just rebind stdout to a file like this (under bash):

Code:
exec >/root/stdout.txt
echo Stuff from here on inherits bash stdout, so it goes to the file

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Sun Apr 11, 2010 9:11 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
Do you also need a "exec 2>&1" to cover stderr? Or is the build environment already doing that sort of thing earlier?

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group