summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Froemberg <dirk@FreeBSD.org>2000-11-30 23:42:41 +0000
committerDirk Froemberg <dirk@FreeBSD.org>2000-11-30 23:42:41 +0000
commitedd90209be7c1e108ad1656ca215f53747ef0188 (patch)
tree89c606587c45a81f18e3e3a1df4808c2d188407c
parentEivind has expressed the desire to give up this port since he no longer uses (diff)
Adjust mysql's homedirectory if already exists.
Notes
Notes: svn path=/head/; revision=35568
-rw-r--r--databases/mysql322-server/pkg-install7
-rw-r--r--databases/mysql323-server/pkg-install7
-rw-r--r--databases/mysql40-server/pkg-install7
-rw-r--r--databases/mysql41-server/pkg-install7
-rw-r--r--databases/mysql50-server/pkg-install7
-rw-r--r--databases/mysql51-server/pkg-install7
-rw-r--r--databases/mysql54-server/pkg-install7
-rw-r--r--databases/mysql55-server/pkg-install7
-rw-r--r--databases/mysql60-server/pkg-install7
-rw-r--r--databases/percona55-server/pkg-install7
10 files changed, 70 insertions, 0 deletions
diff --git a/databases/mysql322-server/pkg-install b/databases/mysql322-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql322-server/pkg-install
+++ b/databases/mysql322-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql323-server/pkg-install b/databases/mysql323-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql323-server/pkg-install
+++ b/databases/mysql323-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql40-server/pkg-install b/databases/mysql40-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql40-server/pkg-install
+++ b/databases/mysql40-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql41-server/pkg-install b/databases/mysql41-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql41-server/pkg-install
+++ b/databases/mysql41-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql50-server/pkg-install b/databases/mysql50-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql50-server/pkg-install
+++ b/databases/mysql50-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql51-server/pkg-install b/databases/mysql51-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql51-server/pkg-install
+++ b/databases/mysql51-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql54-server/pkg-install b/databases/mysql54-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql54-server/pkg-install
+++ b/databases/mysql54-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql55-server/pkg-install b/databases/mysql55-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql55-server/pkg-install
+++ b/databases/mysql55-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/mysql60-server/pkg-install b/databases/mysql60-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/mysql60-server/pkg-install
+++ b/databases/mysql60-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
diff --git a/databases/percona55-server/pkg-install b/databases/percona55-server/pkg-install
index 3e925021ede1..42682fea5aff 100644
--- a/databases/percona55-server/pkg-install
+++ b/databases/percona55-server/pkg-install
@@ -25,6 +25,13 @@ POST-INSTALL)
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${DB_DIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\""
+ else
+ echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..."
+ exit 1
+ fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"