#!/usr/bin/perl

$db_name = "clx_db";
$psql ="$ENV{'POSTGRESHOME'}/bin/psql -d $db_name -qtc";

if ($#ARGV < 2) {
	print "Usage: set/home_node <call> <node>\n";
	exit 1;
}

$call = $ARGV[1];
$hn = $ARGV[2];

$cmd = sprintf("%s \"UPDATE us_uhn SET nhn_cnt = -1, hn_call='%s', hn_ssid=0 \
	WHERE us_call = '%s';\"",$psql,$hn,$call);

system($cmd);
