Several questions [solved]

All other questions
DaveS
Posts: 9
Joined: 03 Nov 2011, 15:28

Several questions [solved]

Postby DaveS » 03 Nov 2011, 15:35

Hi all,

Just discovered sysresccd and must say well done.
Just put in onto a USB flash drive and I quite like the
development packages that come preloaded.
The GUI is very nice too.

I do however have a few questions:

1) Is it possible to setup/start a http server (with cgi support - perl)
(preferably from autorun).

2) Beep and all other sounds don't work on my motherboard which
is an Intel D410PT with Intel HD audio (Realtek ALC662), is there a driver available?

Thanking you in advance,
Dave.
Last edited by DaveS on 10 Nov 2011, 13:46, edited 1 time in total.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Several questions

Postby gernot » 03 Nov 2011, 18:17

Yes, you can configure and start thttpd with a autorun script.
cgi and perl is possible but a bit restricted. Not all perl-cgi modules are present.

sysrcd has no kernel soundcard driver or sound tools built in.

gernot

DaveS
Posts: 9
Joined: 03 Nov 2011, 15:28

Re: Several questions

Postby DaveS » 05 Nov 2011, 18:19

Hi gernot,

Thanks for the reply.
I have thttpd working by starting it with the following:
thttpd -c "**.cgi" -d "/SomeDirectory"

With html pages it works perfectly, however with any file with the
.cgi extension it never works.
I have tried two simple cgi scripts, one using bash and the other perl:

Code: Select all

#!/bin/bash
echo "just a test"


Code: Select all

#!/usr/bin/perl
print "just a test";


Now depending on the file permissions, I either get a 403 error
or it simply displays the code instead of running it or it just returns a blank screen
on the browser (i.e. the script does not return any output and may not be even executing).

I have even tried changing the ownership of the cgi files but still nothing works.
Any tips/hints will be greatly appreciated.

Dave.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Several questions

Postby gernot » 05 Nov 2011, 19:23

it work like you think, but the page must begin with a empty line. (why ever...)

Code: Select all

#!/bin/bash
echo
echo "just a test"


The script must be world executable. o+x .

gernot

DaveS
Posts: 9
Joined: 03 Nov 2011, 15:28

Re: Several questions

Postby DaveS » 05 Nov 2011, 21:34

Thank you gernot, worked perfectly with the cgi-bin directories
permission set to 755 and the cgi file (bash script) permission also 755.
The empty first line in the bash script did the trick.

The perl script still does not work though but that is OK as I can get by
with just bash for now.

Dave.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Several questions

Postby gernot » 06 Nov 2011, 15:36

watch the two \n (newline)

Code: Select all

#!/usr/bin/perl
print "\njust a test\n";


Gernot

DaveS
Posts: 9
Joined: 03 Nov 2011, 15:28

Re: Several questions

Postby DaveS » 06 Nov 2011, 20:27

Perfect, merci beaucoup.

One last question, I intend making use of autorun1
but I don't want the system to wait for a keypress
once autorun is finished.
Can I put the option ar_nowait in syslinux.cfg
under the label rescuecd_std (the one I use) as follows:

Code: Select all

LABEL rescuecd_std
MENU LABEL 1) SystemRescueCd: default boot options
LINUX rescuecd
INITRD initram.igz
APPEND ar_nowait
APPEND scandelay=5
TEXT HELP
Boot standard 32bit kernel with default options (should always work)
You should use this entry if you don't know which one to use
ENDTEXT


Dave.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Several questions

Postby gernot » 06 Nov 2011, 20:42

sure, but i don't know that 2 APPEND lines work.
Use " APPEND scandelay=5 ar_nowait "

DaveS
Posts: 9
Joined: 03 Nov 2011, 15:28

Re: Several questions

Postby DaveS » 06 Nov 2011, 20:56

Thank you for your prompt reply.
Dave.


Return to “Other”

Who is online

Users browsing this forum: No registered users and 3 guests