 
     \001l { send "$pass\r" }
 
-    \001p { send "rpm -qa | grep netscreen | xargs -r rpm -e ; rm -rf /var/netscreen/*/* /usr/netscreen/*" }
+    \001p { 
+      if { $os == "Linux" } {
+        send -s "rpm -qa | grep netscreen | xargs -r rpm -e ; rm -rf /var/netscreen/*/* /usr/netscreen/*" 
+      } elseif { $os == "SunOS" } {
+        send -s "pkgrm -n `pkginfo -c application | grep -i netscreen | grep -v NSCNpostgres | awk '{print \$2}' | xargs` &&  rm -rf /var/netscreen/ /usr/netscreen/"
+      } 
+    }
 
     \001i { 
         send  "\r"

set time     [ timestamp -format "%Y/%m/%d %H:%M:%S"]
send_log "\n---------- log close at $time ----------\n"
log_file
exec /bin/bzip2 /home/case/store/work/_archives_worklogs/$host-$filetime.log
send_user "\n---------- session closed at $time ----------\n"
exit


#!/usr/bin/expect -f

# $Id$

set logdir "/home/case/store/work/_archives_worklogs/"

set os "Linux"

set send_slow {10 .01}
set timeout 60
