|
From: <fcr...@us...> - 2012-11-25 07:14:28
|
Revision: 825
http://safekeep.svn.sourceforge.net/safekeep/?rev=825&view=rev
Author: fcrawford
Date: 2012-11-25 07:14:22 +0000 (Sun, 25 Nov 2012)
Log Message:
-----------
Added configuration for client user from patch by Riley Revels <ril...@gm...>
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.backup.txt
safekeep/trunk/doc/safekeep.conf.txt
safekeep/trunk/safekeep
safekeep/trunk/safekeep.conf
Modified: safekeep/trunk/doc/safekeep.backup.txt
===================================================================
--- safekeep/trunk/doc/safekeep.backup.txt 2012-05-04 13:14:16 UTC (rev 824)
+++ safekeep/trunk/doc/safekeep.backup.txt 2012-11-25 07:14:22 UTC (rev 825)
@@ -99,7 +99,8 @@
The user name to use when connecting to the client. This user
must have read permissions for the files that will be backed up,
so it most likely needs to be 'root'.
- Optional, defaults to 'root'.
+ Optional, defaults to the value given by `client.user` in
+ `safekeep.conf`.
/backup/host/@nice::
The nice adjustment for the client. This settings is normally
Modified: safekeep/trunk/doc/safekeep.conf.txt
===================================================================
--- safekeep/trunk/doc/safekeep.conf.txt 2012-05-04 13:14:16 UTC (rev 824)
+++ safekeep/trunk/doc/safekeep.conf.txt 2012-11-25 07:14:22 UTC (rev 825)
@@ -35,6 +35,12 @@
If not specified, it defaults to the home directory
of the backup user.
+client.user::
+ The default Unix user which will be used on the client.
+ This can be overridden on a host by host basis in the `.backup`
+ file.
+ If not specified, it defaults to `root`.
+
email.from::
The email address to be used as sender when sending the logs.
If not specified `safekeep` will use SafeKeep@<hostname fqdn>.
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2012-05-04 13:14:16 UTC (rev 824)
+++ safekeep/trunk/safekeep 2012-11-25 07:14:22 UTC (rev 825)
@@ -64,6 +64,7 @@
verbosity_trickle = ''
work_user = getpass.getuser()
backup_user = None
+client_user = 'root'
home_dir = None
base_dir = None
current_pid = os.getpid()
@@ -396,7 +397,7 @@
if host and port and not port.isdigit():
raise ConfigException('Host port must be a number: "%s"' % port)
if host and not user:
- user = 'root'
+ user = client_user
if host and not key_ctrl:
key_ctrl = os.path.join('.ssh', 'safekeep-server-ctrl-key')
if host and not key_data:
@@ -1660,7 +1661,7 @@
except getopt.GetoptError:
usage(2)
- global backup_user, home_dir, base_dir
+ global backup_user, client_user, home_dir, base_dir
global verbosity_level
mode = None
@@ -1792,6 +1793,8 @@
backup_user = props['backup.user']
if 'base.dir' in props:
base_dir = props['base.dir']
+ if 'client.user' in props:
+ client_user = props['client.user']
if 'email.smtp.server' in props:
smtp = props['email.smtp.server']
if 'email.to' in props:
Modified: safekeep/trunk/safekeep.conf
===================================================================
--- safekeep/trunk/safekeep.conf 2012-05-04 13:14:16 UTC (rev 824)
+++ safekeep/trunk/safekeep.conf 2012-11-25 07:14:22 UTC (rev 825)
@@ -10,6 +10,9 @@
# the base directory for data repository relative paths
base.dir = /var/lib/safekeep
+# the default user under which the client will run
+# client.user = root
+
# by default, be nice during backup
# you can control the server/client nice level via
# nice.adjustment.server and nice.adjustment.client
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|