Author: pebender
Date: Wed Sep 3 20:36:21 2008
New Revision: 3700
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_external
Log:
- Converted mm_external to perl.
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Wed Sep 3
20:36:21 2008
@@ -22,6 +22,7 @@
boot line.
- Converted the following mm_* scripts to perl:
mm_command
+ mm_external
mm_game_exit
mm_game_start
mm_sleep
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_external
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_external
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_external
Wed Sep 3 20:36:21 2008
@@ -1,23 +1,18 @@
-#!/bin/sh
+#!/usr/bin/perl
-. /etc/rc.d/functions
+use strict;
+use warnings;
-case $1 in
- power_off)
- /usr/bin/test -n "${MM_EXTERNAL_POWER_OFF}" && eval
${MM_EXTERNAL_POWER_OFF}
- ;;
- power_on)
- /usr/bin/test -n "${MM_EXTERNAL_POWER_ON}" && eval
${MM_EXTERNAL_POWER_ON}
- ;;
- volume_down)
- /usr/bin/test -n "${MM_EXTERNAL_VOLUME_DOWN}" && eval
${MM_EXTERNAL_VOLUME_DOWN}
- ;;
- volume_up)
- /usr/bin/test -n "${MM_EXTERNAL_VOLUME_UP}" && eval
${MM_EXTERNAL_VOLUME_UP}
- ;;
- volume_mute)
- /usr/bin/test -n "${MM_EXTERNAL_VOLUME_MUTE}" && eval
${MM_EXTERNAL_VOLUME_MUTE}
- ;;
-esac
+require MiniMyth;
-exit 0
+my $action = shift;
+
+my $minimyth = new MiniMyth;
+
+my $command = $minimyth->var_get('MM_EXTERNAL_' . "\U$action");
+if ((defined($command)) && ($command))
+{
+ system(qq($command));
+}
+
+1;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---