init: fix typo and prevent startup error

metrics_library upstart job failes on boot because of a typo and soft
link command linking on existing file. Fixing the typo and add '-f' flag
when linking to supress error.

BUG=chrome-os-partner:40606
TEST=`start metrics_library`

Change-Id: I3c144f4a636a61bb460a9de74771f61ad1e6b0f9
Reviewed-on: https://chromium-review.googlesource.com/273172
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
This commit is contained in:
Wei-Ning Huang 2015-05-26 15:26:23 +08:00 committed by ChromeOS Commit Bot
parent ef31bec13e
commit 323d70d143
1 changed files with 2 additions and 2 deletions

View File

@ -15,11 +15,11 @@ pre-start script
EVENTS_FILE=${METRICS_DIR}/uma-events
mkdir -p ${METRICS_DIR}
touch ${EVENTS_FILE}
chown chronos.chronos ${EVENT_FILE}
chown chronos.chronos ${EVENTS_FILE}
chmod 666 ${EVENTS_FILE}
# TRANSITION ONLY.
# TODO(semenzato) Remove after Chrome change, see issue 447256.
# Let Chrome read the metrics file from the old location.
mkdir -p /var/run/metrics
ln -s ${EVENTS_FILE} /var/run/metrics
ln -sf ${EVENTS_FILE} /var/run/metrics
end script