Shellcheck compliance, not that it is important right now

This commit is contained in:
2018-02-19 00:01:18 +02:00
parent 19268ecafb
commit 295406d9c7
4 changed files with 9 additions and 8 deletions

View File

@@ -11,11 +11,11 @@ if [ "${OS}" = "SunOS" ] ; then
elif [ "${OS}" = "AIX" ] ; then elif [ "${OS}" = "AIX" ] ; then
OSSTR="${OS} $(oslevel) ($(oslevel -r))" OSSTR="${OS} $(oslevel) ($(oslevel -r))"
elif [ "${OS}" = "Linux" ] ; then elif [ "${OS}" = "Linux" ] ; then
KERNEL=$(uname -r) #KERNEL=$(uname -r)
if [ -f /etc/redhat-release ] ; then if [ -f /etc/redhat-release ] ; then
DIST="$(cat /etc/redhat-release)" DIST="$(cat /etc/redhat-release)"
elif [ -f /etc/SuSE-release ] ; then elif [ -f /etc/SuSE-release ] ; then
DIST=$(tr "\n" ' ' < /etc/SuSE-release | sed s/VERSION.*//) DIST=$(tr "\\n" ' ' < /etc/SuSE-release | sed s/VERSION.*//)
elif [ -f /etc/debian_version ] ; then elif [ -f /etc/debian_version ] ; then
DIST="Debian $(cat /etc/debian_version)" DIST="Debian $(cat /etc/debian_version)"
elif [ -f /etc/slackware-version ] ; then elif [ -f /etc/slackware-version ] ; then

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
OS=`sh detect-unix.sh` OS=$(sh detect-unix.sh)
# Determine task # Determine task
#case $1 in #case $1 in
@@ -24,4 +24,4 @@ esac
#if [ "$OS" = "Arch Linux" ] ; then #if [ "$OS" = "Arch Linux" ] ; then
# PM="pacman" # PM="pacman"
#fi #fi
echo $PM echo $PM

View File

@@ -1 +1,2 @@
./rmpsd start --daemonize=no #!/bin/bash
./rmpsd start --daemonize=no

View File

@@ -2,13 +2,13 @@
printf "Password for 'rmps' DB user: " printf "Password for 'rmps' DB user: "
read -rs dbpass read -rs dbpass
printf "\nEnter the first RMPS username: " printf "\\nEnter the first RMPS username: "
read -r username read -r username
printf "Full name for the new user '%s': " "${username}" printf "Full name for the new user '%s': " "${username}"
read -r fullname read -r fullname
printf "Password for RMPS user '%s': " "${username}" printf "Password for RMPS user '%s': " "${username}"
read -rs newuser_pass read -rs newuser_pass
printf "\nEnter e-mail for the new user: " printf "\\nEnter e-mail for the new user: "
read -r email read -r email
printf "Initializing DB... " printf "Initializing DB... "
salt=$(head -c 32 /dev/urandom|sha1sum|head -c 32) salt=$(head -c 32 /dev/urandom|sha1sum|head -c 32)
@@ -24,4 +24,4 @@ mysql -u rmps --password="$dbpass" -e "\
set @passHash=\"$pass_hash\";\ set @passHash=\"$pass_hash\";\
set @passSalt=\"$salt\";\ set @passSalt=\"$salt\";\
$(cat init_rmps_db.sql)" $(cat init_rmps_db.sql)"
printf "Done!\n" printf "Done!\\n"