Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35527 - gentoo-rsync-portage.sh from gentoo-rsync-mirror-1.0-r2 fails
Summary: gentoo-rsync-portage.sh from gentoo-rsync-mirror-1.0-r2 fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Michael Imhof (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-10 07:59 UTC by Nils Ohlmeier
Modified: 2003-12-10 13:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Ohlmeier 2003-12-10 07:59:31 UTC
The gentoo-rsync-portage.sh script from  gentoo-rsync-mirror-1.0-r2 fails if it is called with complete path (as /opt/gentoo-rsync/gentoo-rsync-portage.sh) because of the missing logfile /var/log//opt/gentoo-rsync/gentoo-rsync-portage.sh.
(Initialy i called the script directly from the directory, thus it exists only a log file /var/log/gentoo-rsync-portage.sh)

Reproducible: Always
Steps to Reproduce:
1. execute gentoo-rsync-portage.sh initaly directly from its directory
2. call the script with complete path (e.g. from cron)
3.

Actual Results:  
The sync fails, because of the non-existing log file.

Expected Results:  
It should sync :-)

I propose to replace the "$0" in the lines 11, 13 and 15 with "`basename $0`.

E.g.:
-echo "Started update at" `date` >> /var/log/$0.log 2>&1
+echo "Started update at" `date` >> /var/log/`basename $0`.log 2>&1
Comment 1 Michael Imhof (RETIRED) gentoo-dev 2003-12-10 13:39:58 UTC
Doing the changes you suggested.
Seems like i overlooked that.
Comment 2 Michael Imhof (RETIRED) gentoo-dev 2003-12-10 13:40:53 UTC
Changes completed and commited.
Thanks for your help!