diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-09-14 02:18:49 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-09-14 02:18:49 +0200 |
commit | 7cd42984d306f3a06b7e2b72aadbc4d41c0e3ebf (patch) | |
tree | b98ffeb4c727028a7cc0013e39e99d0494a772c2 /templates/cdemu | |
parent | a9a7249c1b32d1f17cac5471e8352aa574d84971 (diff) | |
download | play-7cd42984d306f3a06b7e2b72aadbc4d41c0e3ebf.tar.gz play-7cd42984d306f3a06b7e2b72aadbc4d41c0e3ebf.tar.bz2 play-7cd42984d306f3a06b7e2b72aadbc4d41c0e3ebf.zip |
Split iso-implementations
Diffstat (limited to '')
-rw-r--r-- | templates/cdemu | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/cdemu b/templates/cdemu new file mode 100644 index 0000000..2a07fa0 --- /dev/null +++ b/templates/cdemu @@ -0,0 +1,25 @@ + +_cdemu_dev () { + exc "cdemu device-mapping | grep \"^${CDEMU_NO}\" | tr -s ' ' | cut -f 2 -d' '" +} + +iso_prepare () { + default_prepare + + declare -g MOUNT CDEMU_NO + + [[ $MOUNT != /* ]] && MOUNT="$HOME/isos/spiele/$MOUNT" + CDEMU_NO=${CDEMU_NO:-0} + + exc cdemu load $CDEMU_NO "$MOUNT" + exc mount $(_cdemu_dev) +} + +iso_cleanup () { + exc umount $(_cdemu_dev) + exc cdemu unload $CDEMU_NO +} + +EXPORT iso prepare cleanup + +# vim:ft=sh |