Skip to content

Commit

Permalink
Style corrections around ssh lib
Browse files Browse the repository at this point in the history
respect lexical ordering in files that include this lib.

shorten tests for ssh_create_root_key and ssh_ensure_remote_dir
  • Loading branch information
lelutin committed May 24, 2015
1 parent b64a200 commit 425342d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
13 changes: 3 additions & 10 deletions handlers/rdiff.helper.in
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,10 @@ do_rdiff_ssh_con() {
[ $? = 0 ] || return
fi

ssh_create_root_key "$rdiff_title" "$rdiff_host" "$rdiff_user"
if [ "$?" != "0" ]; then
# key setup failed, can't go further
return
fi
# if key setup fails, can't go further
ssh_create_root_key "$rdiff_title" "$rdiff_host" "$rdiff_user" || return

ssh_ensure_remote_dir "$rdiff_title" "$rdiff_directory" "$rdiff_host" "$rdiff_user"
if [ "$?" != "0" ]; then
# couldn't ensure that remote dir is created and accessible, can't go further
return
fi
ssh_ensure_remote_dir "$rdiff_title" "$rdiff_directory" "$rdiff_host" "$rdiff_user" || return

do_rdiff_con
}
Expand Down
12 changes: 6 additions & 6 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
my_execbindir = $(pkglibdir)
my_execbin_SCRIPTS = easydialog parseini tools vserver ssh
my_execbin_SCRIPTS = easydialog parseini tools ssh vserver

CLEANFILES = $(my_execbin_SCRIPTS)

EXTRA_DIST = easydialog.in parseini.in tools.in vserver.in ssh.in
EXTRA_DIST = easydialog.in parseini.in tools.in ssh.in vserver.in

edit = sed \
-e "s,@CFGDIR\@,$(CFGDIR),g" \
Expand All @@ -25,10 +25,10 @@ tools: $(srcdir)/tools.in
rm -f tools
$(edit) tools.in > tools

vserver: $(srcdir)/vserver.in
rm -f vserver
$(edit) vserver.in > vserver

ssh: $(srcdir)/ssh.in
rm -f ssh
$(edit) ssh.in > ssh

vserver: $(srcdir)/vserver.in
rm -f vserver
$(edit) vserver.in > vserver
2 changes: 1 addition & 1 deletion src/backupninja.in
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ fi

# include shared functions
. $libdirectory/tools
. $libdirectory/vserver
. $libdirectory/ssh
. $libdirectory/vserver

setfile $conffile

Expand Down
2 changes: 1 addition & 1 deletion src/ninjahelper.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ fi
# include shared functions
. $libdirectory/easydialog
. $libdirectory/tools
. $libdirectory/vserver
. $libdirectory/ssh
. $libdirectory/vserver

# am I running as root?
if [ "$UID" != "0" ]; then
Expand Down

0 comments on commit 425342d

Please sign in to comment.