binary file within a shell script

2008-05-08 Thread Mathieu Prevot
Hi there, I would like to use one exec file from a shellscript but I would like it to be incorporated in the same file, like Nvidia do for its FreeBSD drivers. How can I do this in a convenient way ? Mathieu ___ freebsd-hackers@freebsd.org mailing list

Re: binary file within a shell script

2008-05-08 Thread Jille
It's not exactly what you are looking for: But you could take a look at shar(1). I don't even know for sure whether it can archive binaries. shar gives you a shellscript, to which you could prefix your own script, and when you run it, it'll extract the incorporated file, and you can exec it :)

Re: binary file within a shell script

2008-05-08 Thread Dan Nelson
by /usr/bin/gzexe; that's one way to do it (basically, determine the number of lines in your shell script, append your binary file to the end of the script, and use tail to extract only the binary file to a tempfile). -- Dan Nelson [EMAIL PROTECTED

Re: binary file within a shell script

2008-05-08 Thread ari edelkind
- base64 - b64 - openssl base64 If relying on one of the above is infeasible: You can't portably use inline binary data in a shell script without preprocessing it (as with one of the above programs), since most shells can't handle binary zeros; shar(1) fails in this case. You could

Re: binary file within a shell script

2008-05-08 Thread ari edelkind
[EMAIL PROTECTED] wrote: echo *** generating ls... file=`mktemp /tmp/ls.XX` [[ $? -eq 0 ]] || exit 1 Er, s/^file/lsfile/, obviously. ari ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To

Re: Running a shell script on becoming the CARP master?

2005-11-28 Thread Max Laier
On Saturday 26 November 2005 16:14, Matthew Hagerty wrote: Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master (for example to do maintenance on the current

Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty
Greetings, Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master (for example to do maintenance on the current master)? Thanks, Matthew

Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Dominic Marks
On Saturday 26 November 2005 15:14, Matthew Hagerty wrote: Greetings, Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master (for example to do

Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread David S. Madole
From: Matthew Hagerty [EMAIL PROTECTED] Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master (for example to do maintenance on the current master)? I

Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Dag-Erling Smørgrav
Matthew Hagerty [EMAIL PROTECTED] writes: Are there any hooks into CARP to run a shell script when a machine becomes the master? Have you tried using devd to catch the link up / down event on the carp interface? DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED

Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty
Dag-Erling Smørgrav wrote: Matthew Hagerty [EMAIL PROTECTED] writes: Are there any hooks into CARP to run a shell script when a machine becomes the master? Have you tried using devd to catch the link up / down event on the carp interface? DES I'm not familiar with devd

Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty
David S. Madole wrote: From: Matthew Hagerty [EMAIL PROTECTED] Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master (for example to do maintenance

Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty
Dominic Marks wrote: On Saturday 26 November 2005 15:14, Matthew Hagerty wrote: Greetings, Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master

Shell script

2000-11-22 Thread petro
I have such script. # more trafdump #!/bin/sh - # trafdumpCopyright (c)1993 CAD lab # # dump all records to /var/tmp/trafd.$iface # # usage: trafdump interfaces... # PATH=/usr/local/bin WHERE_PID=/var/run/trafd.ed0 LOG_FILE=/var/log/traffic.log if [ $# = 0 ]; then

Re: Shell script

2000-11-22 Thread void
On Thu, Nov 23, 2000 at 02:30:54AM +0200, petro wrote: I have such script. PATH=/usr/local/bin [...] if [ $# = 0 ]; then [...] if [ -f $PID_FILE ]; then [...] if [ $? = 0 ]; then [...] echo error: $PID_FILE not found | tee -a $LOG_FILE I

Re: Shell script

2000-11-22 Thread Tony Fleisher
Your PATH variable (line 8) needs to include /bin, where both tee and [ are located. Tony. On Thu, 23 Nov 2000, petro wrote: I have such script. # more trafdump #!/bin/sh - # trafdumpCopyright (c)1993 CAD lab # # dump all records to /var/tmp/trafd.$iface # #

Upper -Lower in shell script

1999-12-17 Thread Alex
This message was sent from Geocrawler.com by "Alex" [EMAIL PROTECTED] Be sure to reply to that address. Hello, I need in my shell script change upper case to lower case for characters. Cureently , I call c programm from script which do it. Is anybody did this inside script? Than

Re: Upper -Lower in shell script

1999-12-17 Thread Dan Nelson
In the last episode (Dec 17), Alex said: I need in my shell script change upper case to lower case for characters. Cureently , I call c programm from script which do it. Is anybody did this inside script? #!/bin/sh var=MixedCase lvar=`echo $var | tr A-Z a-z` echo $lvar #!/usr/local/bin/zsh

Re: Upper -Lower in shell script

1999-12-17 Thread Chris Costello
On Fri, Dec 17, 1999, Alex wrote: I need in my shell script change upper case to lower case for characters. Cureently , I call c programm from script which do it. Is anybody did this inside script? Shells such as ksh (both PDKSH and ATT KSH, available in ports, support this) and bash

Re: Upper -Lower in shell script

1999-12-17 Thread Chris Costello
On Fri, Dec 17, 1999, Alex wrote: I need in my shell script change upper case to lower case for characters. Cureently , I call c programm from script which do it. Is anybody did this inside script? Oops. That should be typeset -l. $ typeset -l var $ var=ABC $ echo $var abc -- |Chris

Re: Help with exit status in shell script

1999-08-28 Thread Oliver Fromme
Roger Hardiman wrote in list.freebsd-hackers: There is a bug in the PicoBSD build shell script in and I have no idea how to fix it. As a result, build errors are not caught. It is all to do with Exit Status of programs called from a shell script. Please help. The code fragment from

Re: Help with exit status in shell script

1999-08-28 Thread Luigi Rizzo
Hi, There is a bug in the PicoBSD build shell script in and I have no idea how to fix it. As a result, build errors are not caught. It is all to do with Exit Status of programs called from a shell script. Please help. The code fragment from /usr/src/release/picobsd/build/build

Help with exit status in shell script

1999-08-28 Thread Roger Hardiman
Hi, There is a bug in the PicoBSD build shell script in and I have no idea how to fix it. As a result, build errors are not caught. It is all to do with Exit Status of programs called from a shell script. Please help. The code fragment from /usr/src/release/picobsd/build/build is ./stage1 21

Re: Help with exit status in shell script

1999-08-28 Thread Oliver Fromme
Roger Hardiman wrote in list.freebsd-hackers: There is a bug in the PicoBSD build shell script in and I have no idea how to fix it. As a result, build errors are not caught. It is all to do with Exit Status of programs called from a shell script. Please help. The code fragment from

Re: Help with exit status in shell script

1999-08-28 Thread Ben Smithurst
Roger Hardiman wrote: Build calls Stage1. Stage1 will return with an error code in some cases and we want to trap this and halt the Build script. ./stage1 21 | tee stage1.out if [ X$? != X0 ] ; then Normally, $? will return the Exit Status of the last executed program. However,

Re: Help with exit status in shell script

1999-08-28 Thread Luigi Rizzo
Hi, There is a bug in the PicoBSD build shell script in and I have no idea how to fix it. As a result, build errors are not caught. It is all to do with Exit Status of programs called from a shell script. Please help. The code fragment from /usr/src/release/picobsd/build/build