summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <tim@localhost.polyesthetic.msg>2000-08-09 14:57:59 -0400
committerunknown <tim@localhost.polyesthetic.msg>2000-08-09 14:57:59 -0400
commitf5fa7fee9de0ed453960ada8efee6615cc77aa44 (patch)
treea0cf94f2d293550153a190978809da6b5e8220cc /scripts
parent14ccbc09bb38559d8cf30ae2b5690e1a40617882 (diff)
downloadmariadb-git-f5fa7fee9de0ed453960ada8efee6615cc77aa44.tar.gz
Use @HOSTNAME@ instead of hardcoded /bin/hostname.
scripts/mysql_install_db.sh: - use @HOSTNAME@ instead of /bin/hostname scripts/safe_mysqld-watch.sh: - use @HOSTNAME@ instead of /bin/hostname scripts/safe_mysqld.sh: - use @HOSTNAME@ instead of /bin/hostname
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh6
-rwxr-xr-xscripts/safe_mysqld-watch.sh9
-rwxr-xr-xscripts/safe_mysqld.sh6
3 files changed, 10 insertions, 11 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 9cd4af94042..ce6f7155b05 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -77,9 +77,7 @@ then
fi
fi
-# On IRIX hostname is in /usr/bsd so add this to the path
-PATH=$PATH:/usr/bsd
-hostname=`hostname` # Install this too in the user table
+hostname=`@HOSTNAME@` # Install this too in the user table
# Check if hostname is valid
if test "$IN_RPM" -eq 0 -a $force -eq 0
@@ -287,7 +285,7 @@ then
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
echo "This is done with:"
echo "$bindir/mysqladmin -u root -p password 'new-password'"
- echo "$bindir/mysqladmin -u root -h `hostname` -p password 'new-password'"
+ echo "$bindir/mysqladmin -u root -h $hostname -p password 'new-password'"
echo "See the manual for more instructions."
#
# Print message about upgrading unless we have created a new db table.
diff --git a/scripts/safe_mysqld-watch.sh b/scripts/safe_mysqld-watch.sh
index 0111a41969c..30f95fd7a86 100755
--- a/scripts/safe_mysqld-watch.sh
+++ b/scripts/safe_mysqld-watch.sh
@@ -30,10 +30,11 @@ else
ledir=/usr/local/mysql/libexec
fi
-pidfile=$DATADIR/`/bin/hostname`.pid
-log=$DATADIR/`/bin/hostname`.log
-err=$DATADIR/`/bin/hostname`.err
-lockfile=$DATADIR/`/bin/hostname`.lock
+hostname=`@HOSTNAME@`
+pidfile=$DATADIR/$hostname.pid
+log=$DATADIR/$hostname.log
+err=$DATADIR/$hostname.err
+lockfile=$DATADIR/$hostname.lock
#
# If there exists an old pid file, check if the demon is already running
diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh
index 1f481f07fed..c2da0f2ea73 100755
--- a/scripts/safe_mysqld.sh
+++ b/scripts/safe_mysqld.sh
@@ -56,11 +56,11 @@ else
ledir=@libexecdir@
fi
-pid_file=$DATADIR/`/bin/hostname`.pid
+pid_file=$DATADIR/`@HOSTNAME@`.pid
MYSQL_UNIX_PORT=@MYSQL_UNIX_ADDR@
MYSQL_TCP_PORT=@MYSQL_TCP_PORT@
-log=$DATADIR/`/bin/hostname`.log
-err_log=$DATADIR/`/bin/hostname`.err
+log=$DATADIR/`@HOSTNAME@`.log
+err_log=$DATADIR/`@HOSTNAME@`.err
user=@MYSQLD_USER@
# Get first arguments from the my.cfg file, groups [mysqld] and [safe_mysqld]