Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2016 03:30:40 -0700
From:      David Benfell <benfell@parts-unknown.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: SOLVED, BUT UGLY, was Re: rsync update mixed environment
Message-ID:  <570E1FD0.8080309@parts-unknown.org>
In-Reply-To: <570DF3AC.1030501@FreeBSD.org>
References:  <570C9DE3.6030601@parts-unknown.org> <570CA890.7090706@FreeBSD.org> <570D9B74.80005@parts-unknown.org> <570DF3AC.1030501@FreeBSD.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--MieLSOweLMhivGal8qm9P9gQuwrJnhl0W
Content-Type: multipart/mixed; boundary="cTwRfNIajtDbDua2f2BTXUbUWCr363LPA"
From: David Benfell <benfell@parts-unknown.org>
To: freebsd-questions@freebsd.org
Message-ID: <570E1FD0.8080309@parts-unknown.org>
Subject: Re: SOLVED, BUT UGLY, was Re: rsync update mixed environment
References: <570C9DE3.6030601@parts-unknown.org>
 <570CA890.7090706@FreeBSD.org> <570D9B74.80005@parts-unknown.org>
 <570DF3AC.1030501@FreeBSD.org>
In-Reply-To: <570DF3AC.1030501@FreeBSD.org>

--cTwRfNIajtDbDua2f2BTXUbUWCr363LPA
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable



On 04/13/2016 12:22 AM, Matthew Seaman wrote:
> So, rsync works fine if called directly from the command line, but fail=
s
> in your script?
Yup.
>   That sounds as if you're modifying something in the
> environment which is in turn causing problems for rsync(8).  The good
> news is that there are only 8 variables documented as affecting rsync -=
-
> see the section 'ENVIRONMENT VARIABLES' towards the end of rsync(1).
I looked all these up, added the ones you suggested, and had my script
print them out. Nothing unexpected, except perhaps IFS, which mostly
means I haven't taken the trouble to even figure out if I want to do
something with them. These are on the Linux system (and if it helps,
Sabayon is a Gentoo derivative):

CVSIGNORE=3D
RSYNC_ICONV=3D
RSYNC_PROTECT_ARGS=3D
RSYNC_RSH=3D
RSYNC_PROXY=3D
RSYNC_PASSWORD=3D
USER=3Dbenfell
LOGNAME=3Dbenfell
HOME=3D/home/benfell
PATH=3D/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/=
bin:/opt/Citrix/ICAClient:/opt/freerapid:/opt/blackdown-jdk-1.4.2.03/bin:=
/opt/blackdown-jdk-1.4.2.03/jre/bin:/opt/dmd/bin:/usr/lib/plan9/bin:/usr/=
libexec/gpc/x86_64-p
c-linux-gnu/3.4:/opt/nvidia-cg-toolkit/bin:/opt/tivoli/tsm/client/ba/bin:=
/opt/eagle/bin:/opt/vmware/bin:/opt/aws-as-tools/bin:/opt/aws-cw-tools/bi=
n:/opt/aws-elb-tools/bin:/opt/aws-iam-tools/bin:/opt/aws-rds-tools/bin:/u=
sr/bin/cdsclient:/opt/cuda/bin:/opt/ekopath/bin:/usr/ti-linux-gnu/tigcc-b=
in/4.1.2:/usr/ti-linux-gnu/bin
IFS=3D  =20
^@


<snip>

Having to cook up your own mechanism to extract file modification times
is only good in the sense that it enables you to get your job done.
That's what rsync(8) really should be doing -- and the C language
interface using stat(2) is a lot more standardized than the stat(1)
wrapper program.

Yeah, hence the weird script that I adapted from stackoverflow.
>
> 	Cheers,
>
> 	Matthew
>
>

--=20
David Benfell, Ph.D.
benfell@parts-unknown.org



--cTwRfNIajtDbDua2f2BTXUbUWCr363LPA--

--MieLSOweLMhivGal8qm9P9gQuwrJnhl0W
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXDh/VAAoJEOoml8Ul4D7WiaoP/05d+n73tEeIx9ro0eakd4PR
KNdKCgQWDKA62UnclYGs8mZW0t/U4xEq0L7BztMuFfKsUY/9kUYTldXx+COMUUC/
IKiVJAAWoQPQcLpSn9XQGB4IbvQIvpt07sOU6vZIE3TEG2BPmAOnyBNaAJhr61hA
9pIMoAtJCqtnvKh4MdiFNc23RQ4uDU4V9DuOlmrS88e4A3EkfvT/WXyYY3S4nFR5
htidzjix6+BmD6QXv7W7X9eW5YNky/3k69XMSFjUTRAccSS/rWZu8vQ0mJpDwBhf
HKQFwk/HGvXcQ9nivTx/w4yzMl5ihYgjKPRxYXoyz8ea8lv3vhmQtCc+jVFoe1e5
0+3OZuLkmUtz8RYakMKbKT5gjDky2z+0S8H5nsabBm+YTpbGzUJrePZ+7EeeuMKd
jHX7XPgnB0o3BG3XDUSc+EPJs7CiuaLnN5N3Fl0lRw7b+H2h2riJPTIfj48jJR6Z
xsjWDjqPxIbiL+WZysjMKsV8U13APBTyrhJZageXHWADQMGZlU9Tyle8rCJsVA/2
0KJVm1itZveALDk6t6MDU7ljmTKXotaJdJn1aFT4wXCAocS7phiHrydd9KxA5Q8N
5O8R5p3gsuH7kwzraM5tyFGSJzOcKnTo/bRwsVe0s7JVBEbhI8dotaG3zkencrJ5
N32XJHQLCeoKVtn6BopY
=XYU1
-----END PGP SIGNATURE-----

--MieLSOweLMhivGal8qm9P9gQuwrJnhl0W--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?570E1FD0.8080309>