#!/usr/bin/perl

print `cat /proc/meru/kcomm/rt_transports`;

open CONFIG, "+</proc/meru/kcomm/rt_config" or die "Unable to open /proc/meru/kcomm/rt_config: $!\n";

$cmd = join ' ', @ARGV;

chomp $cmd;
$cmd = "$cmd\n";

$res = syswrite CONFIG, $cmd, length($cmd);

if (!$res && !($res eq "0")) {
	print "Detected error: $!\n";
	print "Reason: ";
}
else {
	print "Result: ";
}

sysread CONFIG, $result, 2000, 0;
print $result;
