#!/bin/sh # # This is an example SysV-init-script by Winfried Truemper that you can use # and modify to your liking # PATH="$PATH:@prefix@" export PATH MY_CFG="@prefix@/mysql.cfg" read_mysql_config() { # this routine requires a sed, which reads even the last line of input MY_CONFIG_FILE="$1" # file to read setting from MY_CONFIG_SECTION="$2" # section inside the file MY_CONFIG_TAG="$3" # name of the setting inside the section TAB=`printf "\t" ""` # makes the code cut&paste safe sed -n -f - "$MY_CONFIG_FILE" <