-[ "$sqldump" == "no" -o -d $dumpdir ] || mkdir -p $dumpdir
-[ "$hotcopy" == "no" -o -d $hotdir ] || mkdir -p $hotdir
+
+if [ $usevserver = yes ]
+then
+ [ "$sqldump" == "no" -o -d $vroot$dumpdir ] || $VSERVER $vsname exec mkdir -p $dumpdir
+ [ "$hotcopy" == "no" -o -d $vroot$hotdir ] || $VSERVER $vsname exec mkdir -p $hotdir
+else
+ [ "$sqldump" == "no" -o -d $dumpdir ] || mkdir -p $dumpdir
+ [ "$hotcopy" == "no" -o -d $hotdir ] || mkdir -p $hotdir
+fi
+
+#######################################################################
+## AUTHENTICATION
+
+#
+# one of three authentication methods:
+# 1. setting the user, so that /home/user/.my.cnf is used.
+# 2. specifying the user and password in the handler config,
+# which generates a temporary .my.cnf in /root/.my.cnf
+# 3. specify the config file with --defaults-file
+# (this option DOESN'T WORK WITH MYSQLHOTCOPY)
+#