Sep
26
2008
To install SSH run though the following
useradd sshd
cd <folder_for_compiling>
wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.3p2.tar.gz
tar xzvf openssh-4.3p2.tar.gz
cd openssh-4.3p2
./configure –without-zlib-version-check
make
make install
Create the following statup script:
=====
#! /bin/sh
# export USER=”root”
# NAME=ssh
start()
{
if [ ! -d /var/empty ]; then
mkdir /var/empty
fi�
/usr/local/sbin/sshd
}
stop()
{
killall sshd
}
case “$1″ in
start)
echo -n “Starting sshd: ”
start
;;
stop)
echo -n “Stopping sshd ”
stop
;;
restart)
echo -n “Restarting sshd ”
stop
start
;;
*)
echo “Usage: /etc/init.d/$NAME {start|stop|restart}”
exit 1
;;
esac
exit 0
====
save in /etc/init.d/sshd
chmod +x /etc/init.d/sshd
/etc/init.d/sshd
ln -s /etc/init.d/sshd /etc/rc.d/rc2.d/S07sshd
no comments | tags: linkst, ssh | posted in LinkStation
Sep
24
2008
Nesting the loop, Important thing to note make sure that you use recordset
<%@ LANGUAGE=”VBSCRIPT” %>
<% response.cachecontrol = “Public” %>
<%Response.Buffer = False%>
<HTML>
<HEAD>
<TITLE>Title</TITLE>
</HEAD>
<%
Set conn= Server.CreateObject(“ADODB.Connection”)
conn.ConnectionTimeout = Session(“Support_ConnectionTimeout”)
conn.CommandTimeout = Session(“Support_CommandTimeout”)
conn.Open Session(“Support_ConnectionString”), Session(“Support_RuntimeUserName”), Session(“Support_RuntimePassword”)
Set cmdTemp = Server.CreateObject(“ADODB.Command”)
Set rs1 = Server.CreateObject(“ADODB.Recordset”)
cmdTemp.CommandText = “exec sp”
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = conn
rs1.Open cmdTemp, , 0, 1
%>
<% If Not rs1.EOF Or Not rs2.BOF Then %>
<body>
………..First Stuff……………
<%dim CurrentContract%>
<%CurrentContract = 0%>
<% do While NOT adoOpenCalls.EOF %>
�
<%CurrentContract = adoOpenCalls(“con_id”).value%>
…………1st Loop STUFF………
�
<%count = 0%>
<%
Set rs1= Server.CreateObject(“ADODB.Recordset”)
cmdTemp.CommandText = “exec sp” & CurrentContract�
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = conn
adoLoopIncidents.Open cmdTemp, , 0, 1 �
%>
�
�
<%
Do while not adoLoopIncidents.eof
count = count + 1
%>
�
…………2nd Loop STUFF………
�
<%adoLoopIncidents.movenext%>
<%loop%>
………….Stuff at end of loop………..
<% adoOpenCalls.movenext %>
<%loop%>
<%else%>
……..else stuff………
<%end if%>
……..Last Stuff………
<%
adoOpenCalls.Close
Set adoOpenCalls = Nothing
%>
</BODY>
</HTML>
no comments | tags: ASP, DO, loop, SQL, While | posted in Microsoft