CGI with html

2007-09-06 Thread Olivier Regnier

Hi everyone,

I try to write CGI scripts but i have a problem on my screen.

Here is my CGI code
# 
#!/usr/bin/perl

use strict;
use warnings;

# MODULES
use CGI qw(:standard);

# VARIABLES
my $style = get_style();

# HTML PAGE
print header,
 start_html (
-title   = '403, Interdit',
-style   = {-code = $style },
 ),
 end_html;

# CSS style
sub get_style {
   my $content = body {\n
 . margin:150px;\n
 . padding:0px;\n
 . padding:0px;\n
 . 'font-family: tahoma, verdana, arial, helvetica;'. \n
 . font-size:80%;\n
 . color:#66;\n
 . }\n
 . #error {\n
 . margin:0 auto 0 auto;\n
 . padding:10px;\n
 . width:370px;\n
 . text-align:left;\n
 . font-size:8pt;\n
 . background-color:#EE;\n
 . }\n
 . #error h1 {\n
 . margin-top:5px;\n
 . margin-bottom:10px;\n
 . font-size:10pt;\n
 . color:#33;\n
 . }\n
 . #error a {\n
 . color:#DC298D;\n
 . }\n
 . #error a:hover {\n
 . color:#FF;\n
 . background-color:#DC298D;\n
 . text-decoration:none;\n
 . }\n;
 return $content;
 }
# 
and here is the result in html:
# 

!DOCTYPE html
PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml; lang=en-US xml:lang=en-US
head
title403, Interdit/title
style type=text/css
!--/* ![CDATA[ */
body {
margin:150px;
padding:0px;
padding:0px;
font-family: tahoma, verdana, arial, helvetica;
font-size:80%;
color:#66;
}
#error {
margin:0 auto 0 auto;
padding:10px;
width:370px;
text-align:left;
font-size:8pt;
background-color:#EE;
}
#error h1 {
margin-top:5px;
margin-bottom:10px;
font-size:10pt;
color:#33;
}
#error a {
color:#DC298D;
}
#error a:hover {
color:#FF;
background-color:#DC298D;
text-decoration:none;
}
/* ]] */--
/style
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
/head
body
/body
/html
# 

I would like to have this dtd:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
and this meta code, meta http-equiv=Content-Type content=text/html; 
charset=iso-8859-1 / is not at the good place. Logically he is before 
CSS style.


Can you help me please ? Sorry for my english.

Thank you in advance.

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Script with periodic.conf

2007-07-17 Thread Olivier Regnier

[EMAIL PROTECTED] a écrit :

On 16/07/07, Olivier Regnier [EMAIL PROTECTED] wrote:

Hi everoyone,

I have a script called 110.doc-update-csup to keep my documentation
up-to-date and he works well. In this script, i have these following
variables:
- weekly_doc_update_enable=YES
- weekly_doc_update_country=us
- weekly_doc_update_supfile=/usr/local/etc/cvsup/doc-supfile
- weekly_doc_update_logdir=/var/log/sys-update.log

I have the same variables in my periodic.conf file in /etc/ directory.
If i move the file in /usr/local/etc/periodic/weekly/, cron execute the
script two times but if he is in /etc/periodic/weekly/ there are not
problems. What happened ? Do you give informations about this ?




Put the line:
local_periodic=/usr/local/etc/periodic
in your /etc/periodic.conf or delete the
/usr/X11R6/etc/periodic from the line:
local_periodic=/usr/local/etc/periodic /usr/X11R6/etc/periodic
in your /etc/defaults/periodic.conf


Hi, thank you very much, it's perfect. Bye :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Script with periodic.conf

2007-07-16 Thread Olivier Regnier

Hi everoyone,

I have a script called 110.doc-update-csup to keep my documentation 
up-to-date and he works well. In this script, i have these following 
variables:

- weekly_doc_update_enable=YES
- weekly_doc_update_country=us
- weekly_doc_update_supfile=/usr/local/etc/cvsup/doc-supfile
- weekly_doc_update_logdir=/var/log/sys-update.log

I have the same variables in my periodic.conf file in /etc/ directory. 
If i move the file in /usr/local/etc/periodic/weekly/, cron execute the 
script two times but if he is in /etc/periodic/weekly/ there are not 
problems. What happened ? Do you give informations about this ?


Thank you for your help.

Olivier Regnier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Obmenu

2007-07-14 Thread Olivier Regnier

Graham Bentley a écrit :

Hi All,

I was wondering if anyone can shed any light on this, I have come accross
it before but cant remember how to resolve ?

I think there are some Perl modules to install and vaguely recall 
something

to do with cpan but thats about it.

I downloaded the latest obmenu [a graphical menu editor for OpenBox] and
foloowed the instructions - results below ;

$ su root
Password:
3bsd# python setup.py install
running install
running build
running build_py
creating build
creating build/lib
copying obxml.py - build/lib
running build_scripts
creating build/scripts-2.4
copying and adjusting obmenu - build/scripts-2.4
copying and adjusting pipes/obm-xdg - build/scripts-2.4
copying and adjusting pipes/obm-dir - build/scripts-2.4
copying and adjusting pipes/obm-moz - build/scripts-2.4
copying and adjusting pipes/obm-nav - build/scripts-2.4
changing mode of build/scripts-2.4/obmenu from 644 to 755
changing mode of build/scripts-2.4/obm-xdg from 644 to 755
changing mode of build/scripts-2.4/obm-dir from 644 to 755
changing mode of build/scripts-2.4/obm-moz from 644 to 755
copying build/lib/obxml.py - /usr/local/lib/python2.4/site-packages
byte-compiling /usr/local/lib/python2.4/site-packages/obxml.py to 
obxml.pyc

running install_scripts
copying build/scripts-2.4/obmenu - /usr/local/bin
copying build/scripts-2.4/obm-xdg - /usr/local/bin
copying build/scripts-2.4/obm-dir - /usr/local/bin
copying build/scripts-2.4/obm-moz - /usr/local/bin
copying build/scripts-2.4/obm-nav - /usr/local/bin
changing mode of /usr/local/bin/obmenu to 755
changing mode of /usr/local/bin/obm-xdg to 755
changing mode of /usr/local/bin/obm-dir to 755
changing mode of /usr/local/bin/obm-moz to 755
changing mode of /usr/local/bin/obm-nav to 755
running install_data
creating /usr/local/share/obmenu
copying obmenu.glade - /usr/local/share/obmenu
copying icons/mnu16.png - /usr/local/share/obmenu
copying icons/mnu48.png - /usr/local/share/obmenu
3bsd# exit
exit
$ obmenu
Traceback (most recent call last):
  File /usr/local/bin/obmenu, line 21, in ?
import obxml, gtk, gtk.glade, gobject, random, time, os, sys
ImportError: No module named gtk



If anyone could help with this it would be greatly appreciated.

Thanks!







___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

Hello Graham,
---
File /usr/local/bin/obmenu, line 21, in ?
   import obxml, gtk, gtk.glade, gobject, random, time, os, sys
ImportError: No module named gtk
---

You must first install py-gtk2 = 
http://www.freshports.org/x11-toolkits/py-gtk2/
To install the port: |make -C /usr/ports/x11-toolkits/py-gtk2/ install 
clean|

After run obmenu.

Bye bye.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Openbox/GTK 2.x

2007-07-13 Thread Olivier Regnier

Hi everyone,

I'm working with FreeBSD 6.2 with Openbox Window Manager. I want to 
customize my Openbox theme.

It is possible to download GTK themes for Openbox ?

I'm looking the following website:  http://www.gentoo-art.org/ but most 
GTK 2.x are made for Gnome, Kde or Xfce.


Can you give me informations about this ?

Thank your for your help.

Olivier Regnier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Detecting CPU Type

2007-07-10 Thread Olivier Regnier

Hi everyone,

I searching to find information about my CPU type.

With the following command:
# dmesg | grep -i cpu
i have this: CPU: Mobile AMD Sempron(tm) Processor 2800+ (1600.06-Mhz 
686-class CPU)

but with a
# uname -m
i have i386.

I must configure my CPUTYPE?= in /etc/make.conf.
I'ts i686 (686-class) or i386 ?

Can you give me information please ?

Thank you.

Olivier Regnier


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Questions about periodic.conf file

2007-07-04 Thread Olivier Regnier

Hi everyone,

I'm working on FreeBSD 6.2 and my question is, it is possible to use the 
periodic.conf file in /usr/local/etc/ directory ?


My second question, if i create a empty periodic.conf, it is possible to 
include the /etc/defaults/periodic.conf file with a command line by example


include /etc/defaults/periodic.conf ?

Thank you :)



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about periodic.conf file

2007-07-04 Thread Olivier Regnier

Paul Schmehl a écrit :
--On July 4, 2007 6:14:48 PM +0200 Olivier Regnier 
[EMAIL PROTECTED] wrote:



Hi everyone,

I'm working on FreeBSD 6.2 and my question is, it is possible to use the
periodic.conf file in /usr/local/etc/ directory ?


Yes, of course.


My second question, if i create a empty periodic.conf, it is possible to
include the /etc/defaults/periodic.conf file with a command line by
example

include /etc/defaults/periodic.conf ?

It isn't needed.  The /etc/defaults conf files are always parsed.  
They are overridden by any settings in the corresponding file in /etc.


Paul Schmehl ([EMAIL PROTECTED])
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/

Ok thank you for your answer :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Problem with sed to insert a new line

2007-06-28 Thread Olivier Regnier

Hi everyone,

I have a file called test with the following lines:
###
a
b

d
e
f
###

With sed, i want to insert the c letter after b letter. Logically 
simple, but not for me.


Here is my command : # sed -i.old -e 4i\c

I have this message : sed: 1: 4i\c: extra characters after \ at the 
end of i command


I need help please.

Thank you :)

Olivier.
**
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem with sed to insert a new line

2007-06-28 Thread Olivier Regnier

Andrew Pantyukhin a écrit :

On 6/28/07, Olivier Regnier [EMAIL PROTECTED] wrote:

Hi everyone,

I have a file called test with the following lines:
###
a
b

d
e
f
###

With sed, i want to insert the c letter after b letter. Logically
simple, but not for me.

Here is my command : # sed -i.old -e 4i\c

I have this message : sed: 1: 4i\c: extra characters after \ at the
end of i command


AFAIK, with our sed you can only do that with multiline
command:
% sed -i.old -e 4i\\press enter
c test

The backslash is doubled, because shells interpret
backslash-newline as a space. With GNU sed it's
much easier.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

Hello,

Ok with your command :
% sed -i.old -e 4i\\press enter
c test
It's good but if i want to use my command in a shell script ? It's 
possible or not :)


Thank you :)

Olivier.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


script to update my ports tree

2007-06-25 Thread Olivier Regnier

Hi everyone,

I made a shell script in /etc/periodic/daily/610.update-ports-tree and 
in my /etc/periodic.conf, this line : daily_update_ports_tree_enable=YES.


The problem is simple, my script doesn't start at all.

Can you help me please ?

Thank you :)


#!/bin/sh

# if there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi

COUNTRIE=us
RETVAL=0
DATE=`date +%d/%m/%Y`
LOGFILE=/var/log/system-update-report.log

selectserver() {
# Checking fastest cvs server
server=`/usr/local/bin/fastest_cvsup -c $COUNTRIE | grep 1st | \
awk {'print $3'}`

# Creating supfile
sed s/*default host=.*/*default host=$server/ \
/usr/share/examples/cvsup/ports-supfile  /etc/ports-supfile
}

case $daily_update_ports_tree_enable in
[Yy][Ee][Ss])

# Begin
selectserver

# Fetching sources files
/usr/bin/csup /etc/ports-supfile
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo - $DATE - Ports tree: error while fetching sources 
files. \
 $LOGFILE
exit 0
fi

# Creating INDEX.db file
/usr/local/sbin/portsdb -Fu
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo - $DATE - Ports tree: error while creating INDEX.db 
file \
 $LOGFILE
exit 0
fi

# Checking if applications needs to be updated
LIST=`/usr/local/sbin/portversion -l `
RETVAL=$?
if [ $RETVAL != 0 ]
then
echo - $DATE - Ports tree: error while checking updates \
 $LOGFILE
exit 0
fi

# Result
if [ $LIST =  ]
then
echo - $DATE - Ports tree: Up-To-Date  $LOGFILE
else
echo -e - $DATE - Ports tree: Up-To-Date. Here is list of \
applications needs to be updated.\n\n$LIST  $LOGFILE
fi
*) rc=0;;
esac

exit $rc
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: script to update my ports tree

2007-06-25 Thread Olivier Regnier

Daniel Bye a écrit :

Olivier Regnier wrote:
  

Hi everyone,

I made a shell script in /etc/periodic/daily/610.update-ports-tree and
in my /etc/periodic.conf, this line : daily_update_ports_tree_enable=YES.

The problem is simple, my script doesn't start at all.

Can you help me please ?

Thank you :)




There is a syntax error in the script - you have missed the ;; from the
end of the first case statement. Try putting that in and see what
happens. You need something like this, or the script will just fall off
the last case statement, which does nothing:

case $var in
  yes)
do stuff here
;;
  *) ;;
esac


Also, you can simplify the script somewhat - you don't need to jump
through all those hoops with sed and awk to create a supfile on the fly
- just put this in your /etc/make.conf file, which does the same as your
selectserver() function:

SUP_UPDATE= yes
SUP=/usr/bin/csup
SUPFLAGS=   -g
SUPHOST=`/usr/local/bin/fastest_cvsup -Qc uk,fr,nl`
SUPFILE=/etc/cvsup/system

The -Q option to fastest_cvsup returns just the hostname of the fastest
server, so no need to set up an enormous pipeline of tools. Alter the
rest of the script to call 'make update' from /usr/ports, and you're done.

Alternatively, you can use portsnap(8) instead - it automatically
selects one of the available mirrors and uses it. However, you will need
to do a bit of work to set this up - remove your ports tree (no,
seriously - follow along, this is good), then run:

# portsnap fetch extract

Now your script just needs to call

# portsnap fetch update

and that's it. This has the advantage that you don't need to cd to
/usr/ports for it to work.

HTH, one way or another...

Dan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]
  

Hello, thank you for theses informations :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Questions about shell scripts in /etc/periodic/daily

2007-06-25 Thread Olivier Regnier

Hi everyone  :-)

Just curiosly, in /etc/periodic/daily, there are many shell scripts but 
there is an variable rc by example :

- rc=0
- rc=1
- rc=2
- rc=3
What exactly does the rc=0, rc=1 ... flag mean ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


questions about floppy disk

2007-06-24 Thread Olivier Regnier

Hi everyone,

I have two questions about floppy disk with FreeBSD.

How add a UFS filesystem to use the diskette for transfering files ?

I think with this command but i'm not sure because, i can't check for 
the moment.

# newfs /dev/fd0

To mount a floppy disk with ufs filesystem, i must use this command ?
# mount /dev/fd0 /mnt/floppy

Thank you for your help

Bye bye,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


problem with printf in a shell script

2007-06-19 Thread Olivier Regnier

Hi everyone,

I want to insert text in my file, rc.conf : update_motd=NO
I tried printf in my shell script with this command :
printf update_motd=\NO\\  /etc/rc.conf
then, that works well in console but not with my shell script
I would like to insert a \n at the end :)

Can you help me please ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: problem with printf in a shell script

2007-06-19 Thread Olivier Regnier

Olivier Regnier a écrit :

Hi everyone,

I want to insert text in my file, rc.conf : update_motd=NO
I tried printf in my shell script with this command :
printf update_motd=\NO\\  /etc/rc.conf
then, that works well in console but not with my shell script
I would like to insert a \n at the end :)

Can you help me please ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

Sorry :), i founded the solution :
printf 'update_motd=NO'

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


problem with sed substitution

2007-06-19 Thread Olivier Regnier

Hi everyone,

I try to use sed with /etc/gettytab file. I would like to replace this 
text :

\r\n%s\%m ($h) (%t)\r\n\r by Hello world.
I tested with this command :
% sed -i.old -e 's/\r\n%s\%m ($h) (%t)\r\n\r/Hello world/'
but that doesn't work at all.
Can you help me please ?

Thank you :)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD/wpa_supplicant

2007-06-18 Thread Olivier Regnier

Hi everyone,

Anytime i install FreeBSD for the first time on my laptop impossible to 
connect itself to Internet. I must restart with this command :
/etc/rc.d/netif restart. After, there are not problem.  Just the first 
time.  What happened ?


I use wpa_supplicant.

Can you help me please ?

Olivier.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: problem with sed command and csh

2007-06-18 Thread Olivier Regnier

Nikos Vassiliadis a écrit :

On Saturday 16 June 2007 16:35, Olivier Regnier wrote:
  

Olivier Regnier a ιcrit :


Nikos Vassiliadis a ιcrit :
  

On Friday 15 June 2007 13:29, Olivier Regnier wrote:


Hi everybody,

Actually, i'm working on FreeBSD 6.2 and csh shell. With a sh
script, i trying to execute this command :
sed -e s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail/nbsmtp' =
'WITH_IPV6=1 WITH_SSL=1',/  /usr/local/etc/pkgtools.conf

The result is not correct, i have an error :
sed: 1: s/MAKE_ARGS\([^{]*\){/M . . .: bad flag in subsitute
command: 'n'

Can you help me please ?
  

s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail/nbsmtp' =
This n is invalid--^^^

You should add a backslash before each slash
that is not used as a separator for the s command.
E.g.
s/I want to substitute the \/ character/with the _ character/
s/\/\/\//three slashes/

You can also use a separator of choice for the s command.
That is:
s/foo/bar/ is equivalent to [EMAIL PROTECTED]@bar@
is equivalent to sAfooAbarA
is equivalent to s1foo1bar1.

keep in mind, that our sed might not be
totally compatible with GNU sed.

HTH, Nikos


Thank for you anserw but the result is bad again :)
I tryed this : sed
s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail\/nbsmtp' = 'WITH_IPV6=1
WITH_SSL=1',/  /usr/local/etc/pkgtools.conf
but i have this with cat /usr/local/etc/pkgtools.conf

MAKE_ARGS = {nt'mail/nbsmtp' = 'WITH_IPV6=1 WITH_SSL=1',
}

Sed and csh is strange no ? I think \n \t not supported by csh.
  

well yesterday i tried with awk command :
echo MAKE_ARGS = { | awk '{ sub(/MAKE_ARGS = {/, MAKE_ARGS =
{\n\t\'\'ports-mgmtp/portupgrade' =
\'\'WITH_BDB4=1',\n\t\'\'sysutils/fastest_cvsup' =
\'\'WITH_ROUNDTRIP=1',\n\t\'\'mail/nbsmtp' ='WITH_IPV6=1
WITH_SSL=1',\n}); print; }'

The resultat is not bad but incomplete :

MAKE_ARGS = {
   'ports-mgmtp/portupgrade = 'WITH_BDB4=1,
   'sysutils/fastest_cvsup = 'WITH_ROUNDTRIP=1,
   'mail/nbsmtp = 'WITH_IPV6=1 WITH_SSL=1,
}


I should have that :

MAKE_ARGS = {
   'ports-mgmtp/portupgrade*'* = 'WITH_BDB4=1*'*,
   'sysutils/fastest_cvsup*'* = 'WITH_ROUNDTRIP=1*'*,
   'mail/nbsmtp*'* = 'WITH_IPV6=1 WITH_SSL=1*'*,
}




Single quotes(') have special meaning to the shell. You
have to cancel the special meaning using backslashes.
For example:
%set a = foo\'bar
%echo $a
foo'bar
%set a = foo\bar
%echo $a
foobar

As I see in your code above, not every single quote is backslashed.
Asterisks should be backslashed in order to passed literally to awk.
awk has also special characters, which also should be backslashed
to be treated as simple characters. For example(bash, not csh):
nik:0:~$ echo | awk '{ print(foo\bar) }'
foobar

It gets complicated since some characters are special to both, csh
and awk. Frequently, you have to use backslashed backslashes, to get
the wanted result... You should check the csh and awk manual page.

Last but not least, do you have use csh?
It's not recommend for scripting.

HTH, Nikos
  

Hello,

I founded solution with awk command and that works well.

cat /usr/local/etc/pkgtools.conf | awk '{ sub(/^[ \t]*MAKE_ARGS = {/, 
\n\t\x27ports-mgmtp/portupgrade\x27 = 
\x27WITH_BDB4=1\x27,\n\t\x27sysutils/fastest_csvsup\x27 = 
\x27WITH_ROUNDTRIP=1\x27,\n\t\x27mail/nbsmtp\x27 = \x27WITH_IPV6=1 
WITH_SSL=1\x27,\n); print; }'  /usr/local/etc/pkgtools.conf


Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


csh and echo syntax

2007-06-15 Thread Olivier Regnier

Hello,

I'm running FreeBSD 6.2 and i use for the moment csh. When i test this 
command in console

echo -ne /dev/da0s1\t /mnt/usb\t msdos\t rw,noauto\t 0\t 0  /etc/fstab

and with a cat /etc/fstab,
i have this : -ne /dev/da0s1\t /mnt/usb\t msdos\t rw,noauto\t 0\t 0

The \t is not supported with a echo in csh ? What happened ?

Thank you in advance.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


problem with sed command and csh

2007-06-15 Thread Olivier Regnier

Hi everybody,

Actually, i'm working on FreeBSD 6.2 and csh shell. With a sh script, i 
trying to execute this command :
sed -e s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail/nbsmtp' = 
'WITH_IPV6=1 WITH_SSL=1',/  /usr/local/etc/pkgtools.conf


The result is not correct, i have an error :
sed: 1: s/MAKE_ARGS\([^{]*\){/M . . .: bad flag in subsitute command: 'n'

Can you help me please ?

Thank you in advance.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: problem with sed command and csh

2007-06-15 Thread Olivier Regnier

Nikos Vassiliadis a écrit :

On Friday 15 June 2007 13:29, Olivier Regnier wrote:
  

Hi everybody,

Actually, i'm working on FreeBSD 6.2 and csh shell. With a sh script, i
trying to execute this command :
sed -e s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail/nbsmtp' =
'WITH_IPV6=1 WITH_SSL=1',/  /usr/local/etc/pkgtools.conf

The result is not correct, i have an error :
sed: 1: s/MAKE_ARGS\([^{]*\){/M . . .: bad flag in subsitute command:
'n'

Can you help me please ?



s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail/nbsmtp' =
This n is invalid--^^^

You should add a backslash before each slash
that is not used as a separator for the s command.
E.g.
s/I want to substitute the \/ character/with the _ character/
s/\/\/\//three slashes/

You can also use a separator of choice for the s command.
That is:
s/foo/bar/ is equivalent to [EMAIL PROTECTED]@bar@
is equivalent to sAfooAbarA
is equivalent to s1foo1bar1.

keep in mind, that our sed might not be
totally compatible with GNU sed.

HTH, Nikos
  

Thank for you anserw but the result is bad again :)
I tryed this : sed s/MAKE_ARGS\([^{]*\){/MAKE_ARGS\1{\n\t'mail\/nbsmtp' 
= 'WITH_IPV6=1 WITH_SSL=1',/  /usr/local/etc/pkgtools.conf

but i have this with cat /usr/local/etc/pkgtools.conf

MAKE_ARGS = {nt'mail/nbsmtp' = 'WITH_IPV6=1 WITH_SSL=1',
}

Sed and csh is strange no ? I think \n \t not supported by csh.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


.mailrc file

2007-05-06 Thread Olivier Regnier

Hello,

I have a question for you, it is possible to execute a shell script with 
.mailrc file ?

By example : set sendmail=/root/scripts/test.sh

On my FreeBSD that doesn't work at all.

Can you help me please ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


sending email with perl

2007-05-06 Thread Olivier Regnier

Hello,

I written a small script in perl to send email.

Here is the code:

#!/usr/bin/perl -w
use strict;
use warnings;
use MIME::Lite;

my $msg = new MIME::Lite
From ='[EMAIL PROTECTED]',
To ='[EMAIL PROTECTED]',
Subject ='test',
Type ='TEXT',
Data ='Hello this is a test';
$msg - send;

I have a .mailrc file :
set sendmail=/root/scripts/nbsmtp.sh

I installed a small mta nbsmtp and i use a shell script called nbsmtp.sh 
with this line :
/usr/local/bin/nbsmtp -f [EMAIL PROTECTED] -h ssl0.ovh.net -d elipse -p 465 
-U [EMAIL PROTECTED] -P password -M l -s -V


When i execute perl script, there is nothing, why i don't know. That 
work well if i writte in /etc/mail/mailer.conf this line:

sendmail /root/scripts/nbsmtp.sh

With .mailrc that doesn't work.Can you help me please ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


linux-flashplugin9 with Mozilla Firefox

2007-04-14 Thread Olivier Regnier

Hello,

I'm running FreeBSD 6.2 with Mozilla Firefox |2.0.0.3,1 and i tried to 
install linux-flashplugin9.


First step, i installed |linuxpluginwrapper :
|cd /usr/ports/www/linuxpluginwrapper  make install clean|

Step two, linux flash plugin:
|cd /usr/ports/www/linux-flashplugin9  make install clean

Step tree, i made 2 symbolic links :
|cd /usr/local/lib/browser_plugins/
ln -s /usr/local/lib/npapi/linux-flashplugin/flashplayer.xpt
|ln -s /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so|

and  i copied the libmap.conf file in /etc directory :
cp /usr/local/share/examples/linuxpluginwrapper/libmap.conf-FreeBSD6 
/etc/libmap.conf


When i open my browser, i have nothing with about:plugins. I think 
flash9.so doesnt exist no ?


Can you help me please ? Thank you :)

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: script perl with sed command

2007-04-08 Thread Olivier Regnier

Giorgos Keramidas a écrit :

On 2007-04-07 17:31, Olivier Regnier [EMAIL PROTECTED] wrote:
  

Hello,
I have a problem with my perl script with the command sed. Here is a
example of my code:



Don't use system(sed ...) in Perl.  It's considered poor style, since
Perl can do the same without having to fork a shell/sed process.

  

# Selecting the fast server
print Using the server called $server;
system(`/usr/bin/sed 's|\*default host=\(.*\)|\*default host=${server}|' 
$standard_supfile  $standard_supfile.copy`);

system('/bin/mv $standard_supfile.copy $standard_supfile');



Try using Perl only, instead of forking sed(1), like this:

,---
|
| #!/usr/bin/perl -Tw
|
| use strict;
|
| #
| # supfile_set_default_host($supfile, $newhost)
| #   Set the default host used by the supfile $supfile to the
| #   host name supplied as $newhost.
| #
|
| sub supfile_set_default_host($$);
| sub supfile_set_default_host($$)
| {
| my $tmpsupfile;
| my $supfile = shift;
| my $newhost = shift;
|
| if (!defined($supfile) || !defined($newhost)) {
| return undef;
| }
|
| $tmpsupfile = tmp- . $supfile;
| open(SUP, $supfile) or die $!;
| open(TMP,  $tmpsupfile) or die $!;
|
| my $line;
| while (defined($line = SUP)) {
| chomp $line;
| $line =~ s/^(\*[ \t]*default[ \t][ \t]*host[ \t]*=).*/$1${newhost}/;
| print TMP $line\n;
| }
| close(TMP) or die $!;
| close(SUP) or die $!;
| rename($tmpsupfile, $supfile) or die $!;
| return 1;
| }
|
| supfile_set_default_host('standard-supfile', 'cvsup.example.net');
|
`---

This is slightly more complex than forking a sed(1) utility run, but
it's easier to understand (at least it is for me).

A very brief run of the script seems to work here:

,---
|
| $ pwd
| /tmp
| $ cp /usr/share/examples/cvsup/standard-supfile .
| $ grep 'default host' standard-supfile
| *default host=CHANGE_THIS.FreeBSD.org
| $ perl -Tw supfile.pl
| $ grep 'default host' standard-supfile
| *default host=cvsup.keramida
| $
|
`---

- Giorgos

  
Hello and thanks for this perl script. I'm new in perl and when i test 
him, i have an error that says:

No such file or directory at myscript.pl line 18

line 18 = open(TMP,  $tmpsupfile) or die $!;

#!/usr/bin/perl -Tw

use strict;

#
# supfile_set_default_host($supfile, $newhost)
#   Set the default host used by the supfile $supfile to the
#   host name supplied as $newhost.
#

sub supfile_set_default_host($$);
sub supfile_set_default_host($$)
{
my $tmpsupfile;
my $supfile = /etc/standard-supfile;
my $newhost = cvsup.fr.freebsd.org;

if (!defined($supfile) || !defined($newhost)) {
return undef;
}

$tmpsupfile = tmp- . $supfile;
open(SUP, $supfile) or die $!;
open(TMP,  $tmpsupfile) or die $!;

my $line;
while (defined($line = SUP)) {
chomp $line;
$line =~ s/^(\*[ \t]*default[ \t][ \t]*host[ \t]*=).*/$1${newhost}/;
print TMP $line\n;
}
close(TMP) or die $!;
close(SUP) or die $!;
rename($tmpsupfile, $supfile) or die $!;
return 1;
}

supfile_set_default_host('standard-supfile', 'cvsup.example.net');


Thanks again for your help.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


perl/script and retval

2007-04-08 Thread Olivier Regnier

Hello,

I written a small script in sh :
# Downloading doc files
echo === Downloading doc files
/usr/bin/csup $doc_supfile
RETVAL=$?
if [ $RETVAL != 0 ]; then
   echo abort
   exit 0
fi

I want to rewritte this code in perl script.

my $retval=0;
my $doc_supfile=/etc/doc-supfile;

# Downloading doc files
print === Downloading doc files\n;
system(/usr/bin/csup $doc_supfile
if (! $retval) {
print abort;
exit;
}
I don't know what happened with retval but that doesn't work correctly.

Can you help me please ?

Thank you :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


script perl with sed command

2007-04-07 Thread Olivier Regnier

Hello,

I have a problem with my perl script with the command sed. Here is a 
example of my code:


# Selecting the fast server
print Using the server called $server;
system(`/usr/bin/sed 's|\*default host=\(.*\)|\*default host=${server}|' 
$standard_supfile  $standard_supfile.copy`);

system('/bin/mv $standard_supfile.copy $standard_supfile');

But in console i have this message:
sed: 1: s|*default host=(.*)|*d ...: unescaped newline inside 
subsitute pattern


Can you help me please ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: script perl with sed command

2007-04-07 Thread Olivier Regnier

Warren Block a écrit :

On Sat, 7 Apr 2007, Olivier Regnier wrote:

I have a problem with my perl script with the command sed. Here is a 
example of my code:


# Selecting the fast server
print Using the server called $server;
system(`/usr/bin/sed 's|\*default host=\(.*\)|\*default 
host=${server}|' $standard_supfile  $standard_supfile.copy`);

system('/bin/mv $standard_supfile.copy $standard_supfile');

But in console i have this message:
sed: 1: s|*default host=(.*)|*d ...: unescaped newline inside 
subsitute pattern


Most likely there is a newline at the end of $server because it was 
output from backticks.  To fix that, you'd use chomp:


chomp(my $server = `fastest_csvsup -Q -c us`);

Just a general note: Perl's s/ command does more than sed's, with less 
hassle, and you wouldn't have to mess with shell escapes.


-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

Ok thank you for your answer. The script work well.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


send email with mail command

2007-04-06 Thread Olivier Regnier

Hello,

I tested the mail command in console and my question is, it is possible 
to indicate the MAIL FROM: [EMAIL PROTECTED] ?


Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Ports/progress bar

2007-04-05 Thread Olivier Regnier

[EMAIL PROTECTED] a écrit :

On 04/04/07, Olivier Regnier [EMAIL PROTECTED] wrote:

Hello,

I tried to use the bar program to show a progress bar in my shell 
script.


I tested with this command in console:
bar -c 'csup -L 0 /root/csup/doc-supfile'

I see the progress bar but she doesn't work. I think the syntax is
correct no ?

For informations, i use Zsh.


If you are using textproc/bar, from reading the webpage
http://www.theiling.de/projects/bar.html
the answer seems to be no.  That bar seems to work as
a substitute for cat(1), or with the -c flag as a wrapper.
Since you are not putting files into the pipe, but rather
pulling them out, bar cannot see the size of the job and
so determine what portion is finished or not.

There also appears to be a misc/clpbar which may be
closer to what you want here.


Hello, thank you for your answer. I tested clpbar with this command:
csup /root/csup/doc-supfile | bar -s 100m -nan
but there is a problem and in console, i have  this:
27.0B at 27.0B/s eta: +99:99:99 0% [=  ]
27.0B at 27.0B/s eta: +99:99:99 0% [=  ]
27.0B at 27.0B/s eta: +99:99:99 0% [=  ]
27.0B at 27.0B/s eta: +99:99:99 0% [=  ]
perhaps, i can't use this program with csup ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Ports/progress bar

2007-04-04 Thread Olivier Regnier

Hello,

I tried to use the bar program to show a progress bar in my shell script.

I tested with this command in console:
bar -c 'csup -L 0 /root/csup/doc-supfile'

I see the progress bar but she doesn't work. I think the syntax is 
correct no ?


For informations, i use Zsh.

Can you help me please ?

Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Making Customized Bootable FreeBSD

2007-03-26 Thread Olivier Regnier

Hello,

After 3 hours, i made my bootable FreeBSD CD/Floppies. Actually, i 
finished my install.cfg but i have a problem because i don't understand 
the final step :


# mkdir /img
# cd $CHROOTDIR/R/cdrom/disk1/floppies

/* Get mfsroot.gz from mfsroot.flp */
# vnconfig /dev/vn0c mfsroot.flp
# mount /dev/vn0c /img
# cp /img/mfsroot.gz .
# umount /img
# vnconfig -u /dev/vn0c

/* Unzip mfsroot.gz to get mfsroot */
# gunzip mfsroot.gz

/* Put your config file in mfsroot */
# vnconfig /dev/vn0c mfsroot
# mount /dev/vn0c /img
# cp install.cfg /img/.
# umount /img
# vnconfig -u /dev/vn0c
/* (If you 'gzip mfsroot' here, you can use that for bootable mfsroot.flp for 
floppies) */

/* Put mfsroot in kernel so that it will read it when boot time */
# vnconfig /dev/vn0c boot.flp
# mount /dev/vn0c /img
# cp /img/kernel.gz .
# gunzip kernel.gz
# write_mfs_in_kernel -f kernel mfsroot
/* write_mfs_in_kernel can be found at /usr/src/release.  Compile it if you 
haven't. */

# gzip kernel
# cp kernel.gz /img/.
# umount /img
# vnconfig -u /dev/vn0c

Can you explain me this part please ?

Thank you :)
**
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Making Customized Bootable FreeBSD

2007-03-26 Thread Olivier Regnier

Kevin Kinsey a écrit :

Olivier Regnier wrote:

Hello,

After 3 hours, i made my bootable FreeBSD CD/Floppies. Actually, i 
finished my install.cfg but i have a problem because i don't 
understand the final step :




I'm not sure I do either, but I'm willing to attempt to help.  Bearing
in mind IANAE, I *think* this is what you're seeing:


# mkdir /img
# cd $CHROOTDIR/R/cdrom/disk1/floppies


Should be self-explanatory; $CHROOTDIR should be set in the 
environment if you are doing make release



/* Get mfsroot.gz from mfsroot.flp */
# vnconfig /dev/vn0c mfsroot.flp
# mount /dev/vn0c /img
# cp /img/mfsroot.gz .
# umount /img
# vnconfig -u /dev/vn0c


Create a memory disk from the floppy image mfsroot.flp,
mount it, copy the mfsroot.gz to the current working dir,
unmount it and destroy the memory disk.


/* Unzip mfsroot.gz to get mfsroot */
# gunzip mfsroot.gz


Obvious, I hope.


/* Put your config file in mfsroot */
# vnconfig /dev/vn0c mfsroot
# mount /dev/vn0c /img
# cp install.cfg /img/.
# umount /img
# vnconfig -u /dev/vn0c
/* (If you 'gzip mfsroot' here, you can use that for bootable 
mfsroot.flp for floppies) */




Mount the unzipped mfsroot file in a memory disk,
cp your install.cfg to this memory disk, unmount it
and destroy the memory disk.

(Note of concern ... I don't see this getting moved
back to anywhere were it will do some good before moving
to the next step.  Where did you get these instructions?)


/* Put mfsroot in kernel so that it will read it when boot time */
# vnconfig /dev/vn0c boot.flp
# mount /dev/vn0c /img
# cp /img/kernel.gz .
# gunzip kernel.gz
# write_mfs_in_kernel -f kernel mfsroot
/* write_mfs_in_kernel can be found at /usr/src/release.  Compile it 
if you haven't. */


# gzip kernel
# cp kernel.gz /img/.
# umount /img
# vnconfig -u /dev/vn0c



Mount the boot.flp image in a memory disk, grab the kernel,
unzip it, add the altered mfsroot to the kernel using the
write_mfs_in_kernel program/script, zip up the new kernel, copy it to 
the image and unmount said image.


I'm concerned though about this documentation; for one thing
vnconfig is deprecated (except for 4.X releases, which are, uh,
deprecated?), and  write_mfs_in_kernel was nuked from CVS **8 
years ago**  by the venerable jkh himself, so I have to wonder, Where 
did this 'how-to' come from?


You may need someone more familiar with the modern RELENG
system to help with this

Kevin Kinsey
Thank you for your answer. I found these instructions at 
http://www.sfc.wide.ad.jp/%7Ewatari/FreeBSD/boot.html


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Making Customized Bootable FreeBSD

2007-03-26 Thread Olivier Regnier

Kevin Kinsey a écrit :

Olivier Regnier wrote:

Hello,

After 3 hours, i made my bootable FreeBSD CD/Floppies. Actually, i 
finished my install.cfg but i have a problem because i don't 
understand the final step :




I'm not sure I do either, but I'm willing to attempt to help.  Bearing
in mind IANAE, I *think* this is what you're seeing:


# mkdir /img
# cd $CHROOTDIR/R/cdrom/disk1/floppies


Should be self-explanatory; $CHROOTDIR should be set in the 
environment if you are doing make release



/* Get mfsroot.gz from mfsroot.flp */
# vnconfig /dev/vn0c mfsroot.flp
# mount /dev/vn0c /img
# cp /img/mfsroot.gz .
# umount /img
# vnconfig -u /dev/vn0c


Create a memory disk from the floppy image mfsroot.flp,
mount it, copy the mfsroot.gz to the current working dir,
unmount it and destroy the memory disk.


/* Unzip mfsroot.gz to get mfsroot */
# gunzip mfsroot.gz


Obvious, I hope.


/* Put your config file in mfsroot */
# vnconfig /dev/vn0c mfsroot
# mount /dev/vn0c /img
# cp install.cfg /img/.
# umount /img
# vnconfig -u /dev/vn0c
/* (If you 'gzip mfsroot' here, you can use that for bootable 
mfsroot.flp for floppies) */




Mount the unzipped mfsroot file in a memory disk,
cp your install.cfg to this memory disk, unmount it
and destroy the memory disk.

(Note of concern ... I don't see this getting moved
back to anywhere were it will do some good before moving
to the next step.  Where did you get these instructions?)


/* Put mfsroot in kernel so that it will read it when boot time */
# vnconfig /dev/vn0c boot.flp
# mount /dev/vn0c /img
# cp /img/kernel.gz .
# gunzip kernel.gz
# write_mfs_in_kernel -f kernel mfsroot
/* write_mfs_in_kernel can be found at /usr/src/release.  Compile it 
if you haven't. */


# gzip kernel
# cp kernel.gz /img/.
# umount /img
# vnconfig -u /dev/vn0c



Mount the boot.flp image in a memory disk, grab the kernel,
unzip it, add the altered mfsroot to the kernel using the
write_mfs_in_kernel program/script, zip up the new kernel, copy it to 
the image and unmount said image.


I'm concerned though about this documentation; for one thing
vnconfig is deprecated (except for 4.X releases, which are, uh,
deprecated?), and  write_mfs_in_kernel was nuked from CVS **8 
years ago**  by the venerable jkh himself, so I have to wonder, Where 
did this 'how-to' come from?


You may need someone more familiar with the modern RELENG
system to help with this

Kevin Kinsey

Thank you for your answer. I found these instructions at

http://www.sfc.wide.ad.jp/%7Ewatari/FreeBSD/boot.html

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Making Customized Bootable FreeBSD

2007-03-26 Thread Olivier Regnier

Kevin Kinsey a écrit :

Olivier Regnier wrote:

Hello,

After 3 hours, i made my bootable FreeBSD CD/Floppies. Actually, i 
finished my install.cfg but i have a problem because i don't 
understand the final step :




I'm not sure I do either, but I'm willing to attempt to help.  Bearing
in mind IANAE, I *think* this is what you're seeing:


# mkdir /img
# cd $CHROOTDIR/R/cdrom/disk1/floppies


Should be self-explanatory; $CHROOTDIR should be set in the 
environment if you are doing make release



/* Get mfsroot.gz from mfsroot.flp */
# vnconfig /dev/vn0c mfsroot.flp
# mount /dev/vn0c /img
# cp /img/mfsroot.gz .
# umount /img
# vnconfig -u /dev/vn0c


Create a memory disk from the floppy image mfsroot.flp,
mount it, copy the mfsroot.gz to the current working dir,
unmount it and destroy the memory disk.


/* Unzip mfsroot.gz to get mfsroot */
# gunzip mfsroot.gz


Obvious, I hope.


/* Put your config file in mfsroot */
# vnconfig /dev/vn0c mfsroot
# mount /dev/vn0c /img
# cp install.cfg /img/.
# umount /img
# vnconfig -u /dev/vn0c
/* (If you 'gzip mfsroot' here, you can use that for bootable 
mfsroot.flp for floppies) */




Mount the unzipped mfsroot file in a memory disk,
cp your install.cfg to this memory disk, unmount it
and destroy the memory disk.

(Note of concern ... I don't see this getting moved
back to anywhere were it will do some good before moving
to the next step.  Where did you get these instructions?)


/* Put mfsroot in kernel so that it will read it when boot time */
# vnconfig /dev/vn0c boot.flp
# mount /dev/vn0c /img
# cp /img/kernel.gz .
# gunzip kernel.gz
# write_mfs_in_kernel -f kernel mfsroot
/* write_mfs_in_kernel can be found at /usr/src/release.  Compile it 
if you haven't. */


# gzip kernel
# cp kernel.gz /img/.
# umount /img
# vnconfig -u /dev/vn0c



Mount the boot.flp image in a memory disk, grab the kernel,
unzip it, add the altered mfsroot to the kernel using the
write_mfs_in_kernel program/script, zip up the new kernel, copy it to 
the image and unmount said image.


I'm concerned though about this documentation; for one thing
vnconfig is deprecated (except for 4.X releases, which are, uh,
deprecated?), and  write_mfs_in_kernel was nuked from CVS **8 
years ago**  by the venerable jkh himself, so I have to wonder, Where 
did this 'how-to' come from?


You may need someone more familiar with the modern RELENG
system to help with this

Kevin Kinsey

Thank you for your answer. I found these instructions at

http://www.sfc.wide.ad.jp/%7Ewatari/FreeBSD/boot.html

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Ports/Xfce4

2007-03-24 Thread Olivier Regnier

Hello,

I want to install Xfce4 with the port. It is possible to install it 
without Terminal or Mousepad ?


Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Ports/Xfce4

2007-03-24 Thread Olivier Regnier

Leslie Jensen a écrit :



Olivier Regnier wrote:

Hello,

I want to install Xfce4 with the port. It is possible to install it 
without Terminal or Mousepad ?


Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]



Both of them are separate ports. Install the meta port and remove the 
two afterwards.


/Leslie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
I'm searching to disable these applications with make options, but thank 
you for your answer.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Ports/Xfce4

2007-03-24 Thread Olivier Regnier

Warren Block a écrit :

On Sat, 24 Mar 2007, Olivier Regnier wrote:

I want to install Xfce4 with the port. It is possible to install it 
without Terminal or Mousepad ?


Comment them out in the RUN_DEPENDS section of the Makefile.

-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

Hello, ok thank you man :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Building a custom FreeBSD ISO install image

2007-03-21 Thread Olivier Regnier

Hello,

I tried to make a custom FreeBSD ISO install image but when i use this 
command :
prompt# cd /usr/src/release  make release 
CHROOTDIR=/ncvs/FreeBSD/release \

BUILDNAME=6.2-RELEASE-p3 CVSROOT=/ncvs/FreeBSD/cvs  PORTSRELEASETAG=HEAD \
DOCRELEASETAG=HEAD RELEASETAG=RELENG_6_2

after 60 minutes, i have this message :
## Add version information to those things that need it.
if [ ! -f /ncvs/FreeBSD/release/tmp/.world_done ]; then cd 
/ncvs/FreeBSD/Release/usr/src/sys/conf  mv newvers.sh foo  sed 
s/^RELEASE=6.2-RELEASE-p3/ foo  newvers.sh  rm foo; fi

cd: can't cd to /ncvs/FreeBSD/release/usr/src/sys/conf
*** Error code 2

I need help please.

Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD6.2/Fetchmail,Procmail and Mutt

2007-03-13 Thread Olivier Regnier

Hello,

I have a imap account and i want use procmail for filtering electronic 
mail directly on the imap server. I have 2 configuration files.


.fetchmailrc (chmod 600)
poll imp.server.org with proto IMAP
user '[EMAIL PROTECTED]' there with password 'mypassword' is 'olivier' here 
keep;

mda /usr/local/bin/procmail -Y -d %T

.procmailrc
# settings
VERBOSE=yes
LOGNAME=olivier
SHELL=/usr/local/bin/zsh
PATH=/bin:/usr/bin:/usr/local/bin:$HOME/bin
MAILDIR=imaps://imp.server.org/
DEFAULT=$MAILDIR/INBOX
LOGFILE=$HOME/.procmail/procmail.log

:0:
* ^To:[EMAIL PROTECTED]
$DEFAULT/Stuff

:0
$DEFAULT

I don't know what happened but filtering don't work at all. It is 
possible to use procmail directly on the server ?


Thank you :)

Olivier Regnier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


freebsd/pf with pfstat

2007-02-25 Thread Olivier Regnier

hello,

Im currently running on FreeBSD 6.2 with pf (packet filter). I installed
pfstat that collects packet filter statistic and produces graphs.

I added this line in my pf.conf and i restarted pf:
set loginterface $int_if

next step, i created pfstat.conf:

# bandwidth = 1 hour
collect 1 = interface ndis0 pass bytes in ipv4 diff
collect 2 = interface ndis0 pass bytes in ipv4 diff

image /var/stats/pf/bytes_1hour.png {
from 1 hours to now
width 350 height 135
left
   graph 1 bps in bits/s color 0 192 0 filled
right
   graph 2 bps out bits/s color 0 0 255
}

i tested pfstat with this command in root:
pfstat -q

and nothing, my pfstat.log in /var directory is empty. I can't create
graphs. Can you help me please ?

Thank you :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to display an icon on the desktop

2007-02-16 Thread Olivier Regnier

Hello,

Do you know a program or an command line to display an icon on my desktop ?

I don't want idesk or bbdesk :-$

Thank you :-)

--
Cheers,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to display an icon on the desktop

2007-02-16 Thread Olivier Regnier

Giorgos Keramidas a écrit :

On 2007-02-16 23:33, Olivier Regnier [EMAIL PROTECTED] wrote:
  

Hello,

Do you know a program or an command line to display an icon on my desktop ?

I don't want idesk or bbdesk :-$



This is not easy to answer without knowing what your desktop runs.
Some 'desktop environments' can do this.  Others can not.

  
Sorry i forgot to specify this information. Im currently running Openbox 
3 on FreeBSD 6.2.


Thank you :)

--
Cheers,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Idesk - trash icon

2007-02-14 Thread Olivier Regnier

Hello,

I installed Idesk to show differents icons on my desktop with Openbox 3 
and FreeBSD 6.2. I have a file called trash.lnk with the content:


table Icon
   Caption: Trash
   Icon: /home/olivier/.idesktop/icons/emptytrash.png
   Width: 48
   Height: 48
   X: 347
   Y: 660
   Command[0]: thunar trash:///
   Command[1]: /home/olivier/.scripts/./checktrash.sh
end

and here my script called checktrash.sh : (for the moment, I do not 
erase any files. I test only the presence of files and i post the good 
icon on the desktop.


#!/bin/sh
ls -A /home/olivier/.local/share/Trash/files/ | grep . /dev/null
if [ $? -eq 0 ]; then
   perl -i.bak -pe 's/emptytrash/fulltrash/g' 
/home/olivier/.idesktop/trash.lnk

else
   perl -i.bak -pe 's/fulltrash/emptytrash/g' 
/home/olivier/.idesktop/trash.lnk

fi

When i launch Openbox, the script works fine but i have a problem  when  
i empty  the trash with the mouse, idesk doesn't put up-to-date my icon.


Can you help me please ?

Thank you :)

--
Cheers,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Slimtype DVDRW SOSW-833S VRS2

2007-02-10 Thread Olivier Regnier

Hello,

I just joined the list so i hope this is the correct list for this type 
of problem. I installed on my laptop Acer Aspire 3000 from a DOS 
partition because i can't use my cdrom. When i boot from cdrom i get a 
various messages that says :


acd0: FAILURE - TEST_UNIT_READY timed out
acd0: FAILURE - PREVENT_ALLOW timed out
acd0: FAILURE - TEST_UNIT_READY timed out
acd0: FAILURE - TEST_UNIT_READY timed out

or :

acd0: WARNING - TEST_UNIT_READY taskqueue timeout - completing request directly
acd0: WARNING - TEST_UNIT_READY freeing taskqueue zombie request
acd0: WARNING - PREVENT_ALLOW taskqueue timeout - completing request directly
acd0: WARNING - PREVENT_ALLOW freeing taskqueue zombie request

For information, my dvd burner is a Slimtype DVDRW SOSW-833S VRS2.

After my installation, i decided to test with atapicam driver my dvd 
burner.


Relevant output of cdrecord -scanbus

scsibus1:
1,0,0 100) 'Slimtype' 'DVDRW SOSW-833S' 'VRS2' Removable CD-ROM

I have an ATAPI CD burner then i used burncd command to burn an ISO 
image onto a CD :

burncd -f /dev/acd0 -e data 6.2-RELEASE-I386-bootonly.iso

and i get an error that says :

next writeable LBA 311
writing from file 6.2-RELEASE-I386-bootonly.iso size 24848 KB

Input/output error

What do you think about my problems ? For the moment, i can't install 
correctly FreeBSD from cdrom, i can't listen to music from cdrom, i 
can't burn cd/dvd.


Thank you.

--
Cheers,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


eterm/port

2007-02-07 Thread Olivier Regnier

Hello  :)

Yesterday and today, i tried to install eterm with the ports tree with 
this command:

 portinstall eterm

but everytime, i get an error that says Stop in /usr/ports/x11/eterm.! 
x11/eterm  (linker error)   Packages processed: 0 done, 0 ignored, 0 
skipped and 1 failed


You can see the result in the file called eterm-result.

I don't understand. What happened ?

Can you help me please ?

Thank you in advance ;)

--
Cheers,
Olivier Regnier

---  Installing 'eterm-0.9.4' from a port (x11/eterm)
---  Building '/usr/ports/x11/eterm'
===  Cleaning for man2html-3.0.1_1
===  Cleaning for imlib2-20060926_1,1
===  Cleaning for libast-0.7
===  Cleaning for libiconv-1.9.2_2
===  Cleaning for xorg-libraries-6.9.0_1
===  Cleaning for perl-5.8.8
===  Cleaning for pkg-config-0.21
===  Cleaning for freetype2-2.2.1_1
===  Cleaning for jpeg-6b_4
===  Cleaning for png-1.2.14
===  Cleaning for tiff-3.8.2_1
===  Cleaning for libungif-4.1.4_2
===  Cleaning for libid3tag-0.15.1b
===  Cleaning for pcre-7.0
===  Cleaning for libtool-1.5.22_3
===  Cleaning for imake-6.9.0_1
===  Cleaning for libdrm-2.0.2
===  Cleaning for fontconfig-2.3.2_6,1
===  Cleaning for gmake-3.81_1
===  Cleaning for expat-2.0.0_1
===  Cleaning for gettext-0.14.5_2
===  Cleaning for eterm-0.9.4
===  Vulnerability check disabled, database not found
===  Found saved configuration for eterm-0.9.4
===  Extracting for eterm-0.9.4
= MD5 Checksum OK for Eterm-0.9.4.tar.gz.
= SHA256 Checksum OK for Eterm-0.9.4.tar.gz.
===  Patching for eterm-0.9.4
===  Applying FreeBSD patches for eterm-0.9.4
===   eterm-0.9.4 depends on executable in : man2html - found
===   eterm-0.9.4 depends on shared library: Imlib2.3 - found
===   eterm-0.9.4 depends on shared library: ast.2 - found
===   eterm-0.9.4 depends on shared library: iconv.3 - found
===   eterm-0.9.4 depends on shared library: X11.6 - found
===  Configuring for eterm-0.9.4
configure: WARNING: you should use --build, --host, --target
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
/usr/ports/x11/eterm/work/Eterm-0.9.4/missing: Unknown `--run' option
Try `/usr/ports/x11/eterm/work/Eterm-0.9.4/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for preferred libtoolize... libtoolize
checking for preferred aclocal... aclocal
checking for preferred autoconf... autoconf
checking for preferred autoheader... autoheader
checking for preferred automake... automake
grep: ./src/netdisp.c: No such file or directory
checking build system type... i386-portbld-freebsd6.2
checking host system type... i386-portbld-freebsd6.2
checking for i386-portbld-freebsd6.2-gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for AIX... no
checking for library containing strerror... none required
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for i386-portbld-freebsd6.2-g++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking how to run the C++ preprocessor... c++ -E
checking for i386-portbld-freebsd6.2-g77... no
checking for i386-portbld-freebsd6.2-f77... no
checking for i386-portbld-freebsd6.2-xlf... no
checking for i386-portbld-freebsd6.2-frt... no
checking for i386-portbld-freebsd6.2-pgf77... no
checking for i386-portbld-freebsd6.2-fort77... no
checking for i386-portbld-freebsd6.2-fl32... no
checking for i386-portbld-freebsd6.2-af77... no
checking for i386-portbld

Thunar with Fluxbox

2007-02-04 Thread Olivier Regnier

Hello,

I'm currently running Fluxbox on FreeBSD 6.2. I installed Thunar 0.8.0_1 
and icons-tango 0.7.2_3.
The problem is simple, when i start Thunar, i do not see the icons and 
in console, i get an error that says (thunar:1056): Gtk-WARNING **: 
Error loading theme icon for stock; Icon 'gnome-fs-home' not present in 
theme


What happened ?  Can you  help me please ?

Thank you in advance.

--
Cheers,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Remove the cursor with Xorg

2006-12-21 Thread Olivier Regnier
Hello,

I'm running FreeBSD 6.1 with xorg version 6.9.0. I want to make the mouse 
cursor invisible. Can you help me please ?

Thank you :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


New style with Fluxbox

2006-12-16 Thread Olivier Regnier
Hello,

Yesterday, i installed by the ports, fluxbox version 0.1.14_2 on my laptop with 
FreeBSD 6.1. I downloaded a new style called Mysta with theses files:

- theme.cfg
- pixmaps (button.xpm, menu.xpm and toolbar.xpm)

Theses files are in /usr/X11R6/share/fluxbox/styles . The permissions are ok 
but i don't see my new theme in Fluxbox menu called Styles.

Perhaps, i forgot to install a packages, i don't know what happened.

Can you help me please ?

Thanks in advance.

Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: New style with Fluxbox

2006-12-16 Thread Olivier Regnier
I installed fluxbox-devel and it's ok. Im' happy :)

Thank you ;)

On Sat, 16 Dec 2006 21:31:03 +0300
Andrew Pantyukhin [EMAIL PROTECTED] wrote:

 On 12/16/06, Olivier Regnier [EMAIL PROTECTED] wrote:
  Hello,
 
  Yesterday, i installed by the ports, fluxbox version 0.1.14_2
 
 Please try the newer version, x11-wm/fluxbox-devel
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


mpg123 with shoutcast radio

2006-12-13 Thread Olivier Regnier
Hello,

mpg123 is a relatively simple program but doesn't work with .pls file.

I used this command:

% mpg123 -@
http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=5761file=filename.pls;

but i have this message:

 HTTP request failed: 404 Not Found

My pf firewall and proxy are disabled but anytime, i have the same
thing. Estrange no ?

Can you help me please ?

-- 
Cheers,
Olivier Regnier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Beryl on FreeBSD

2006-12-07 Thread Olivier Regnier
Hello,

I'm currently running Xfce4 on FreeBSD 6.1-RELEASE-p11 and my question
is, it is possible to install Beryl using FreeBSD ?

Anyone know if there are tutorials to install Beryl ? I'm using my best
friend who is Google but without success.

Thank you in advance :)
-- 
Cheers,
Olivier Regnier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]