Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 294101 Details for
Bug 367793
[TRACKER] packages with scripts that are not openrc compatible
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
old init script
dnscache (text/plain), 1.52 KB, created by
Rupert Mazzucco
on 2011-11-28 20:59:47 UTC
(
hide
)
Description:
old init script
Filename:
MIME Type:
Creator:
Rupert Mazzucco
Created:
2011-11-28 20:59:47 UTC
Size:
1.52 KB
patch
obsolete
>#!/bin/bash > >export BINARY="/usr/bin/dnscache" >export CONFIG="/etc/dnscache" >export PIDFILE="/var/run/dnscache.pid" >export LOGFILE="/var/log/dnscache" > >depend() >{ > need net > provide dns >} > >start() >{ > echo "Starting DNS cache ... " > > # vars > export SEED="${CONFIG}/seed" > export ENVDIR="${CONFIG}/env" > > # check config dir > echo "Checking for config dir ${CONFIG} ..." > if [ ! -d "${CONFIG}" ]; then > echo "Config dir ${CONFIG} not found." > exit 1 > fi > > # check for another server > echo "Checking pidfile ${PIDFILE} ..." > if [ -r "${PIDFILE}" ]; then > kill -0 `cat "${PIDFILE}"` &>/dev/null > if [ $? -eq 0 ]; then > echo "Already running (pid=`cat \"${PIDFILE}\"`)." > exit 1 > else > echo "Stale pid file, erasing..." > rm -f "${PIDFILE}" > fi > fi > > echo "Setting up logfile ${LOGFILE} ..." > # set up log > if [ "${LOGFILE}" != "/dev/null" ]; then > rm -f "${LOGFILE}" > touch "${LOGFILE}" > fi > > ## generate random seed > rm -f "$SEED" > touch "$SEED" > chmod 400 "$SEED" > dd if=/dev/urandom of="$SEED" bs=128 count=1 2>/dev/null > > # record time > echo "--- START: `date`" >> "$LOGFILE" > > # start the server > exec 2>&1 > exec < "$SEED" > exec envdir "$ENVDIR" sh -c ' > exec envuidgid dnscache softlimit -o250 -d "$DATALIMIT" "$BINARY" > ' 1 >> "$LOGFILE" 2>&1 & echo $! > "$PIDFILE" > echo $? >} > >stop() >{ > echo "Stopping DNS cache... " > kill `cat "$PIDFILE"` > if [ $? -eq 0 ]; then > rm -f "$PIDFILE" > echo OK > else > echo FAILED > fi > echo $? >} > >restart() >{ > stop > sleep 1 > start >} > >case $1 in > start) start > ;; > stop) stop > ;; > restart) restart > ;; >esac
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 367793
: 294101