Bacula-users

[Bacula-users] Windows batch script - need to pass args to a file

2013-09-24 02:03:39
Subject: [Bacula-users] Windows batch script - need to pass args to a file
From: Markus Rosjat <rosjat AT ghweb DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 24 Sep 2013 07:40:51 +0200
Hey there,

I had a look at the shell scripting for the bconsole and on a linux/unix 
machine there is no trouble with passing args to the console by the script

example:

./bconsole -c ./bconsole.conf <<END_OF_DATA
@output /dev/null
messages
@output /tmp/log1.out
@#
@# Tape $1 will be set to use now
@#
update volume=$1 volstatus=used
@#
@# Tape $1 Retention Time will be set to 60s
@#
update volume=$1 VolRetention=60
@#
@# Tape $1 Recycle Flag will be set to yes
@#
update volume=$1 Recycle=yes
@#
@# Tape $1 will now be purged !
@#
update volume=$1 volstatus=purge
messages
@output
quit
END_OF_DATA

this works just fine for me on linux! but I do have windows clients too 
and to and here this kind of approach fails epically for me.

I search the web but didnt really found something, the only option was 
to put the bacula comand in a file and load them from there but then I 
need to pass the args in this file and I dont really want to reinvent 
the wheel for  a task like that. So if someone could confirm that this 
stuff is only working with a shell not with a windows cmd  or may have a 
hint what I did wrong (no need to mention that vars are declared 
diffrent in a batch file).

Regards

Markus

-- 
Markus Rosjat    fon: +49 351 8107223    mail:rosjat AT ghweb DOT de

G+H Webservice GbR Gorzolla, Herrmann, Kögler
Königsbrücker Str. 70, 01099 Dresden

http://www.ghweb.de
fon: +49 351 8107220   fax: +49 351 8107227

Bitte prüfen Sie, ob diese Mail wirklich ausgedruckt werden muss! Before you 
print it, think about your responsibility and commitment to the ENVIRONMENT


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] Windows batch script - need to pass args to a file, Markus Rosjat <=