| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Thu, 25 Sep 2003 12:14:17 -0400 |
| From: | Al Goodniss <amg AT townisp DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | /etc/profile not being executed by cron job |
| Message-ID: | <20030925161417.GA3476@townisp.com> |
| Reply-To: | amg AT townisp DOT com |
| Mime-Version: | 1.0 |
| User-Agent: | Mutt/1.4i |
| X-Spam-Status: | No, hits=-102.5 required=8.0 |
| tests=USER_AGENT_MUTT,USER_IN_WHITELIST | |
| version=2.55 | |
| X-Spam-Level: | |
| X-Spam-Checker-Version: | SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |