HOMEPAGE FORUMS NEWS DOCUMENTATION SCREENSHOTS
SystemRescueCd forums
View unanswered posts | View active topics It is currently 25 Oct 2014, 07:01



Post new topic Reply to topic  [ 7 posts ] 
 autorun with dialog doesn't work 
Author Message

Joined: 25 Oct 2008, 17:20
Posts: 9
Post autorun with dialog doesn't work
Hello all,

I have created an dialog script which should start at boottime.
So I put the script in /root and named it autorun.

The script starts but I can't navigate or do anything.
When I stop it and start the script direct on the console with ./autorun everything is working fine.

So did you have a solution to create an autorun script with dialog?

Thanks,
xabbu


25 Oct 2008, 17:26
Profile

Joined: 13 Nov 2008, 23:17
Posts: 2
Post Re: autorun with dialog doesn't work
That was my problem too. I've found out that the parser program /usr/sbin/autorun logs all output of the autorun script(s) and "dialog" doesn't like that ;-)

Just modify that program as follows:
Code:
# ---- execute the autorun scripts found ----
for curfile in autorunfiles:
[...]
cmd='sh %s 2>&1'%(curfile)

and it works. In fact that is dirty, but quick ;-)
Someone could find a better workaround for example to check whether the autorun script(s) is/are a bash script with "dialog" inside. Then disable logging the output like above.

HTH
paupla


13 Nov 2008, 23:34
Profile

Joined: 02 Feb 2010, 20:19
Posts: 2
Post Re: autorun with dialog doesn't work
I have this problem but I don't understand what are you trying to do paupla and your code doesnt work for me, could someone help me please?


02 Feb 2010, 20:21
Profile

Joined: 13 Nov 2008, 23:17
Posts: 2
Post Re: autorun with dialog doesn't work
OK, the actual /usr/sbin/autorun looks like a bit different, but I newly changed that program so the new version 1.4.0 will work with personal dialog-autorun-scripts too.

The detailed todo you can find in http://www.sysresccd.org/Sysresccd-manual-en_How_to_personalize_SystemRescueCd We need most of that steps there.

1. Follow the Steps 1 and 2
2. The customizing (Step 3) is as follows:
  • find /mnt/custom/customcd/files/usr/sbin/autorun
  • make a copy of that original file
  • edit like I wrote on 13 Nov 2008; the () can also be removed if one like
  • save the file
3. Skip Step 4 and maybe go on with Step 5
4. Step 6 rebuilds the /mnt/custom/customcd/isoroot/sysrcd.dat again (with the modified autorun parser-script)
5. In Step 7 copy your autorun-Script(s) with dialog-parts inside and make it/them executable
6. Maybe set your keymap like shown in Step 8 and/or edit boot options (Step 9)
7. Create and burn the ISO-Image (Steps 10 and 11)
8. Finish with umounting and syncing and reboot your machine with the CD/DVD you even burned

If everything was ok, your autorun script appears after boot process and you can use all the dialog features

Good luck!

paupla


07 Mar 2010, 20:19
Profile

Joined: 02 Feb 2010, 20:19
Posts: 2
Post Re: autorun with dialog doesn't work
OK I'll try that, thanks a lot for your detailed explanation. :)


15 Mar 2010, 19:12
Profile

Joined: 06 Feb 2012, 18:21
Posts: 1
Post Re: autorun with dialog doesn't work
To use dialog without changing the CD, just put the following line in your bash script before running dialog:
Code:
exec >& $(tty)


This is a nasty trick to get the name of current terminal device and redirect all output back to that.


06 Feb 2012, 18:23
Profile

Joined: 07 Apr 2010, 16:19
Posts: 959
Post Re: autorun with dialog doesn't work
Thanks this solution work.
There is also an other nasty way: viewtopic.php?f=25&t=4319

Gernot


06 Feb 2012, 18:44
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: No registered users and 0 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.