[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] Variables in Coldsync.conf



I run in coldsync in daemon mode from /etc/inittab on a Red Hat Linux 7.2
system

I ran your suggested script as a sync conduit and got the output listed
below. It confirms that coldsync switches to the correct user
(bjohnson=uid:500) but does _not_ have the home directory set properly (_/_
instead of _/home/bjohnson_)

It would be very useful to have the home directory set, please consider
implementing it in the next release (the way you suggested)


BTW - I didn't know you could run a bash script as a conduit!  You should
put this in the docs ... it opens up a realm of possibilities (most of this
you can do in Perl but bash scripts are easier to find for newbies):
- print memos as a dump conduit
- get small web bits during the fetch mode so that it's current for the sync
mode (timing might cause problems here)
- run pilot-link to use conduits not yet available for coldsync
- and the list goes on


/etc/coldsync.conf
## A test conduit to dump out the environment variables
conduit sync {
   type: date/DATA;
   path: test;
}

Test conduit script:
#!/bin/sh
echo "Args: $@" 1>&2
echo "Environment:" 1>&2
set 1>&2
echo "200 Success"

and got in my log file (in /var/log/coldsync):
Args: conduit sync
Environment:
BASH=/bin/sh
BASH_VERSINFO=([0]="2" [1]="05" [2]="8" [3]="1" [4]="release"
[5]="i386-redhat-linux-gnu")
BASH_VERSION=$'2.05.8(1)-release'
CONSOLE=/dev/console
DIRSTACK=()
EUID=500
GROUPS=()
HOME=/
HOSTNAME=Pentium_75
HOSTTYPE=i386
IFS=$' \t\n'
INIT_VERSION=sysvinit-2.78
MACHTYPE=i386-redhat-linux-gnu
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
PIPESTATUS=([0]="0")
POSIXLY_CORRECT=y
PPID=1411
PREVLEVEL=N
PS4=$'+ '
PWD=/
RUNLEVEL=5
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments:posix
SHLVL=1
TERM=linux
UID=500
_=Environment:
Success


-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.