import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
3729fc68eb
commit
423ba10303
13396 changed files with 269468 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
# Nico Schottelius
|
||||
# cinit: create templates
|
||||
# 2005-05-24
|
||||
|
||||
set -e
|
||||
|
||||
# init variables
|
||||
. $(dirname $0)/cinit.read-conf
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "`basename $0`: service-name (including category)"
|
||||
echo " I do create a service for you"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BASEDIR=$DESTDIR/$CINIT_DIR
|
||||
|
||||
# read input (from gentoo-bug.sh, http://linux.schottelius.org/scripts/#gentoo-bug
|
||||
reread()
|
||||
{
|
||||
_tmp=""
|
||||
name="$1"
|
||||
|
||||
while [ ! "$_tmp" ]; do
|
||||
read -p "$1 [$_tmp]: " _tmp
|
||||
done
|
||||
|
||||
echo $_tmp
|
||||
}
|
||||
|
||||
|
||||
for svc in $@; do
|
||||
echo -n "Creating $svc ..."
|
||||
mkdir -p "${BASEDIR}/${svc}"
|
||||
cd ${BASEDIR}/${svc}
|
||||
mkdir -p "${C_WANTS}" "${C_NEEDS}"
|
||||
echo "finished."
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue