#!/usr/local/bin/perl

# /* LICENSE:
#   =========================================================================
#     CMPack'03 Source Code Release for OPEN-R SDK v1.0
#     Copyright (C) 2003 Multirobot Lab [Project Head: Manuela Veloso]
#     School of Computer Science, Carnegie Mellon University
#     All rights reserved.
#   ========================================================================= */

while(1) {
  open(STOPMEMSTICK,"</var/pipes/stop_memstick");
  while(<STOPMEMSTICK>) {
  }
  close(STOPMEMSTICK);

  system("/sbin/cardctl eject 0");
}
