From: Al Goodniss <amg@townisp.com>
To: cygwin@cygwin.com
Subject: /etc/profile not being executed by cron job
Date: Thu, 25 Sep 2003 16:21:00 -0000 [thread overview]
Message-ID: <20030925161417.GA3476@townisp.com> (raw)
Hi,
Please point me to what I missed. I have a simple cron job doing backups using tar and find. Works flawlessly in an interactive shell. Cron also works fine for fetching mail, etc. The combination doesn't work.
When I run my bash (tcsh also fails) script via Cron the wrong find is found. Instead of /usr/bin/find I get the windows version. My /etc/profile does prepend the directories, the permissions seen accurate - as per the other fixes that were in the archives.
What did I miss?
-Al
--- Test script ---
#!/usr/bin/bash
date
echo $PATH # reports only windows paths, no Cygwin
which find # Finds the win32 version
-- Results --
Thu Sep 25 12:08:00 EST 2003
/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/PROGRA~1/ULTRAE~1:/c/Program Files/Micros
oft SQL Server/80/Tools/Binn/:/bin
/c/WINDOWS/system32/find
-- /etc/profile --
PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
export PATH
USER="`id -un`"
# Set up USER's home directory
if [ -z "$HOME" ]; then
HOME="/home/$USER"
fi
if [ ! -d "$HOME" ]; then
mkdir -p "$HOME"
fi
export HOME USER
for i in /etc/profile.d/*.sh ; do
if [ -f $i ]; then
. $i
fi
done
export MAKE_MODE=unix
export PS1='\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ '
cd "$HOME"
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
next reply other threads:[~2003-09-25 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-25 16:21 Al Goodniss [this message]
2003-09-25 16:38 ` Igor Pechtchanski
2003-09-26 15:18 ` Al Goodniss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030925161417.GA3476@townisp.com \
--to=amg@townisp.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).