Hello.
I just figured out that in order to make the wrapper script really
transparent I need to make sure its stdin gets fed to the stdin of the
command being run. I changed this, so here comes the revised script proposed
to be included as an example in /usr/share/doc/flashcache-utils
#! /bin/bash
CACHEDEVICES="/dev/mapper/mycachedev1 /dev/mapper/mycachedev2"
exec 3<&0
$* <&3 &
mypid=$!
for dev in ${CACHEDEVICES} ; do flashcache_setioctl -a -b ${mypid} ${dev} ; done
wait ${mypid}
exitcode=$?
for dev in ${CACHEDEVICES} ; do flashcache_setioctl -r -b ${mypid} ${dev} ; done
exit ${exitcode}
best regards
Giacomo Mulas
--
_________________________________________________________________
Giacomo Mulas <[email protected]>
_________________________________________________________________
OSSERVATORIO ASTRONOMICO DI CAGLIARI
Str. 54, Loc. Poggio dei Pini * 09012 Capoterra (CA)
Tel. (OAC): +39 070 71180 248 Fax : +39 070 71180 222
Tel. (UNICA): +39 070 675 4916
_________________________________________________________________
"When the storms are raging around you, stay right where you are"
(Freddy Mercury)
_________________________________________________________________
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]