Small fix in sfttp_file()
This commit is contained in:
parent
9c298e0c79
commit
86e9b9054a
@ -41,6 +41,7 @@
|
|||||||
# @(#) 2015-08-26: added DO_SFTP_CHMOD configuration parameter to avoid
|
# @(#) 2015-08-26: added DO_SFTP_CHMOD configuration parameter to avoid
|
||||||
# @(#) setstat failures with sftp_file() when remote file
|
# @(#) setstat failures with sftp_file() when remote file
|
||||||
# @(#) permissions do not allow (VRF 1.2.1) [Patrick Van der Veken]
|
# @(#) permissions do not allow (VRF 1.2.1) [Patrick Van der Veken]
|
||||||
|
# @(#) 2015-08-27: smmall fix in sftp_file() (VRF 1.2.2) [Patrick Van der Veken]
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
|
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
|
||||||
#******************************************************************************
|
#******************************************************************************
|
||||||
@ -54,7 +55,7 @@
|
|||||||
# or LOCAL_CONFIG_FILE instead
|
# or LOCAL_CONFIG_FILE instead
|
||||||
|
|
||||||
# define the V.R.F (version/release/fix)
|
# define the V.R.F (version/release/fix)
|
||||||
MY_VRF="1.2.1"
|
MY_VRF="1.2.2"
|
||||||
# name of the global configuration file (script)
|
# name of the global configuration file (script)
|
||||||
GLOBAL_CONFIG_FILE="manage_sudo.conf"
|
GLOBAL_CONFIG_FILE="manage_sudo.conf"
|
||||||
# name of the local configuration file (script)
|
# name of the local configuration file (script)
|
||||||
@ -677,14 +678,14 @@ OLD_PWD=$(pwd) && cd ${TRANSFER_DIR}
|
|||||||
# transfer, (possibly) chmod the file to/on the target server (keep STDERR)
|
# transfer, (possibly) chmod the file to/on the target server (keep STDERR)
|
||||||
if (( DO_SFTP_CHMOD ))
|
if (( DO_SFTP_CHMOD ))
|
||||||
then
|
then
|
||||||
sftp ${SFTP_ARGS} ${SSH_TRANSFER_USER}@${TRANSFER_HOST} >/dev/null <<EOT
|
sftp ${SFTP_ARGS} ${SUDO_TRANSFER_USER}@${TRANSFER_HOST} >/dev/null <<EOT
|
||||||
cd ${REMOTE_DIR}
|
cd ${REMOTE_DIR}
|
||||||
put ${SOURCE_FILE}
|
put ${SOURCE_FILE}
|
||||||
chmod ${TRANSFER_PERMS} ${SOURCE_FILE}
|
chmod ${TRANSFER_PERMS} ${SOURCE_FILE}
|
||||||
EOT
|
EOT
|
||||||
SFTP_RC=$?
|
SFTP_RC=$?
|
||||||
else
|
else
|
||||||
sftp ${SFTP_ARGS} ${SSH_TRANSFER_USER}@${TRANSFER_HOST} >/dev/null <<EOT
|
sftp ${SFTP_ARGS} ${SUDO_TRANSFER_USER}@${TRANSFER_HOST} >/dev/null <<EOT
|
||||||
cd ${REMOTE_DIR}
|
cd ${REMOTE_DIR}
|
||||||
put ${SOURCE_FILE}
|
put ${SOURCE_FILE}
|
||||||
EOT
|
EOT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user