LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 03-28-2013, 07:01 AM   #1
suitianshi
LQ Newbie
 
Registered: Feb 2013
Posts: 14

Rep: Reputation: Disabled
why there's no output on my screen? ubuntu upstart event


I added a new file test.conf to /etc/init/, content as below:

start on test
stop on shutdown
console output
exec echo hello

and I used "initctl emit laji" to trigger it but no console output.

what am i doing wrong?
 
Old 03-28-2013, 07:47 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,246

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Why "laji"? Your event is called "test". Also this example it is rather a task and not service, so "task" keyword should be included.

Last edited by eSelix; 03-28-2013 at 07:55 AM.
 
Old 03-28-2013, 08:37 AM   #3
suitianshi
LQ Newbie
 
Registered: Feb 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
sorry for my mistake, event name is "test".
is the term "task" necessary?

start on test
task
console output
exec echo hello

is the above correct?
i'm using windows and thus cann't try it out.
 
Old 03-28-2013, 10:07 PM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,246

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Task is not neccessary in this situation, but your executed command is a task (start, do what must do and end) as opposed to service, which start on event emit and stop on event stop condition. You can get unexpected behavior. For example when you add later "respawn" ("echo" will respawn forever).

This is correct and should work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sequencing devices in Upstart (Ubuntu 10.04) gorlash Linux - General 0 10-06-2010 01:17 PM
LXer: Ubuntu and Fedora Replace init with Upstart LXer Syndicated Linux News 0 05-05-2009 04:50 AM
LXer: Ubuntu's Upstart event-based init daemon LXer Syndicated Linux News 0 02-08-2008 09:30 AM
LXer: Interview with Scott, Ubuntu and Upstart developer LXer Syndicated Linux News 0 04-27-2007 08:47 PM
:-( unable to GET EVENT: Input/output error WilliamS Slackware 1 10-12-2004 03:22 PM


All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration