X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpost-install;h=6c953a97ec8518ccfb0cccd53ac979a10dc31f52;hb=46a6cd65aaf72c044223fa7c33a28d6e99fa1f20;hp=e76a0a7739315961119bc4106e32b50c4cd41d30;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage5/post-install b/stage5/post-install index e76a0a7..6c953a9 100755 --- a/stage5/post-install +++ b/stage5/post-install @@ -1,57 +1,13 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name. +source ../functions/main -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +if [ -n "${REGUSER}" ]; then + hv_useradd -g users -G audio,video,cdrom,usb,shutdown,halusers \ + -s /bin/bash -m ${REGUSER} +fi if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then - - ######################################### - # MySQL - ######################################### - READ_VALID="no" - - while [ "${READ_VALID}" = "no" ]; do - echo "Do you want to set MySQL root password? (y/n): " - read SET_MYSQL_ROOT_PASS - - if [ "${SET_MYSQL_ROOT_PASS}" = "y" -o "${SET_MYSQL_ROOT_PASS}" = "n" ]; then - READ_VALID="yes" - else - echo "Error, answer y or n" - fi - done - - if [ "${SET_MYSQL_ROOT_PASS}" = "y" ]; then - # Further configuration requires that the MySQL server be running: - mysqld_safe --user=mysql 2>&1 >/dev/null & - - PASS_MATCH="no" - - while [ "${PASS_MATCH}" = "no" ]; do - echo -n "Enter new MySQL root password: " >&2 - read PASS1 - echo -n "Re-enter password to confirm : " >&2 - read PASS2 - - if [ "${PASS1}" != "${PASS2}" ]; then - echo "Error, passwords don't match" - else - PASS_MATCH="yes" - fi - done - - mysqladmin -u root password ${PASS1} - echo "MySQL root password set." - - echo "Shutting down MySQL server:" - # Configuration of the server is now finished. Shuting down the server. - mysqladmin -p shutdown - fi ######################################### # Apache