Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8404/scripts/scripts
Modified Files:
Tag: rel-1-2-patches
httpd mysqld setup
Log Message:
Moving startup arguments to config.
Index: httpd
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/httpd,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- httpd 25 Jul 2005 17:15:43 -0000 1.1.2.1
+++ httpd 10 Aug 2005 13:46:59 -0000 1.1.2.2
@@ -23,7 +23,6 @@
NAME="Apache2"
CONFIGNAME=APACHE2
DAEMON=/usr/sbin/httpd
-PARAMETER="-f /etc/apache2/httpd.conf"
# source function library
source /etc/init.d/functions
@@ -47,7 +46,7 @@
case "$1" in
start)
echo -n "Starting $NAME: "
- loadproc $DAEMON $PARAMETER
+ loadproc $DAEMON $APACHE2_PARM
;;
stop)
echo -n "Shutting down $NAME: "
Index: setup
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/setup,v
retrieving revision 1.20.2.5
retrieving revision 1.20.2.6
diff -u -d -r1.20.2.5 -r1.20.2.6
--- setup 26 Jul 2005 18:47:35 -0000 1.20.2.5
+++ setup 10 Aug 2005 13:46:59 -0000 1.20.2.6
@@ -859,10 +859,13 @@
NTPSERVER=$n
done
while true; do
+ source $CONFIG
$DIALOG $BACKLAB --title "Other Services Menu" --backtitle "$BACKTITLE" \
--default-item "$NETDEF" \
--menu "Navigate with the arror keys, and press ENTER to select" 0 0 0 \
'NTP' '--> Setup the NTP (time) Service ' \
+ 'MySQL' '--> MySQL startup parameters ' \
+ 'HTTP' '--> Apache2 startup parameters ' \
2> $RESULT
RETURN=$?
NETDEF="$(cat $RESULT)"
@@ -881,6 +884,14 @@
[ ! -f ${NTPST}.org -a -f $NTPST ] && mv $NTPST ${NTPST}.org
echo "$NTPSERVER" > $NTPST
;;
+ MySQL)
+ inputbox "MySQL" "Enter the MySQL startup parameters" "$MYSQL_PARM" && \
+ mod_config $CONFIG MYSQL_PARM "$(cat $RESULT)"
+ ;;
+ HTTP)
+ inputbox "HTTP" "Enter the Apache2 startup parameters" "$APACHE2_PARM" && \
+ mod_config $CONFIG APACHE2_PARM "$(cat $RESULT)"
+ ;;
esac
else
return
Index: mysqld
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/mysqld,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -d -r1.5.2.3 -r1.5.2.4
--- mysqld 25 Jul 2005 19:23:54 -0000 1.5.2.3
+++ mysqld 10 Aug 2005 13:46:59 -0000 1.5.2.4
@@ -23,9 +23,6 @@
NAME="MYSQL Server"
CONFIGNAME=MYSQL
DAEMON=/usr/bin/mysqld_safe
-PIDFILE=/var/run/mysql.pid
-DATADIR="/var/mysql"
-PARAMETER="-u mysql --pid-file=$PIDFILE --datadir=$DATADIR"
# source function library
source /etc/init.d/functions
@@ -41,7 +38,7 @@
test "$START" = "yes" || exit 0
if [ ! -e $DAEMON ]; then
- echo
+ echo
echo "$DAEMON not found. Did you install the package?"
exit 1
fi
@@ -50,11 +47,11 @@
start)
if [ ! -d $DATADIR ]; then
echo "Initializing new $NAME data dir: "
- mkdir -p $DATADIR
- mysql_install_db --user=mysql --datadir=$DATADIR
+ #mkdir -p $DATADIR
+ mysql_install_db $MYSQL_PARM
fi
echo "Starting $NAME: "
- $DAEMON $PARAMETER &> /dev/null &
+ $DAEMON $MYSQL_PARM &> /dev/null &
;;
stop)
echo -n "Shutting down $NAME: "
|