Commit f2a9e683 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rename check_key to check_ssh_key

parent 0a0acbf9
...@@ -78,7 +78,7 @@ fi ...@@ -78,7 +78,7 @@ fi
if [ -n "$REMOTE" ] ; then if [ -n "$REMOTE" ] ; then
check_key check_ssh_key
test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file" test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file"
ssh -t $BUILDSERVER loginhsh ${SAVEOPT/-r/} ssh -t $BUILDSERVER loginhsh ${SAVEOPT/-r/}
exit exit
......
...@@ -214,7 +214,7 @@ pack_src_rpm ${LISTRPMARGS} ...@@ -214,7 +214,7 @@ pack_src_rpm ${LISTRPMARGS}
#LISTARGS=${LISTARGS/-s/} #LISTARGS=${LISTARGS/-s/}
if [ -n "$REMOTEBUILD" ] ; then if [ -n "$REMOTEBUILD" ] ; then
fatal "Do not realized yet" fatal "Do not realized yet"
check_key check_ssh_key
REMCOM="ssh $BUILDSERVER" REMCOM="ssh $BUILDSERVER"
echo echo
...@@ -294,7 +294,7 @@ if [ -z "${UPLOADNOW}" ] ; then ...@@ -294,7 +294,7 @@ if [ -z "${UPLOADNOW}" ] ; then
fi fi
echog "Uploading to $GIRARHOST" echog "Uploading to $GIRARHOST"
check_key check_ssh_key
$RSYNC -vay --partial --progress --checksum \ $RSYNC -vay --partial --progress --checksum \
-e ssh $LISTBUILT $GIRARHOST: && \ -e ssh $LISTBUILT $GIRARHOST: && \
......
...@@ -87,7 +87,7 @@ if echo "$LISTNAMES" | grep -q spec ; then ...@@ -87,7 +87,7 @@ if echo "$LISTNAMES" | grep -q spec ; then
fi fi
if [ -n "$REMOTEBUILD" ] ; then if [ -n "$REMOTEBUILD" ] ; then
check_key check_ssh_key
test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file" test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file"
# FIXME - get via etersoft-build-utils # FIXME - get via etersoft-build-utils
REMOTERPMDIR=`ssh $BUILDSERVER echo $HOME`/RPM REMOTERPMDIR=`ssh $BUILDSERVER echo $HOME`/RPM
......
...@@ -211,13 +211,19 @@ parse_cmd_pre_spec() ...@@ -211,13 +211,19 @@ parse_cmd_pre_spec()
fi fi
} }
check_key() check_ssh_key()
{ {
echog "Check access to SSH private key..." echog "Check access to SSH private key..."
ssh-add -l || ssh-add $SSH_KEYFILE || return 1 ssh-add -l || ssh-add $SSH_KEYFILE || return 1
return 0 return 0
} }
# for backward compatibility
check_key()
{
check_ssh_key
}
make_temp_file() make_temp_file()
{ {
# Workaround about broken mktemp # Workaround about broken mktemp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment