Skip to content

Commit

Permalink
Add user-friendly dependency list if installed manually [build]
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Oct 13, 2023
1 parent 21f93cd commit c3ab067
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
3 changes: 2 additions & 1 deletion makerpm.pl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
nouninstall=1
nostart=1
nostop=1
export config_dir var_dir perl autoos port ssl nochown autothird noperlpath nouninstall nostart allow makeboot nostop
nodepsmsg=1
export config_dir var_dir perl autoos port ssl nochown autothird noperlpath nouninstall nostart allow makeboot nostop nodepsmsg
./setup.sh >/tmp/.webmin/usermin-setup.out 2>&1
chmod 600 /tmp/.webmin/usermin-setup.out
rm -f /var/lock/subsys/usermin
Expand Down
51 changes: 35 additions & 16 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ if [ $? != "0" ]; then
exit 1;
fi

echo "***********************************************************************"
echo "* Welcome to the Usermin setup script, version $ver *"
echo "***********************************************************************"
echo "****************************************************************************"
echo "* Welcome to the Usermin setup script, version $ver *"
echo "****************************************************************************"
echo "Usermin is a web-based interface that allows Unix-like operating"
echo "systems and common Unix services to be easily administered."
echo ""
Expand Down Expand Up @@ -88,7 +88,7 @@ if [ -r "$srcdir/setup-pre.sh" ]; then
fi

# Ask for usermin config directory
echo "***********************************************************************"
echo "****************************************************************************"
echo "Usermin uses separate directories for configuration files and log files."
echo "Unless you want to run multiple versions of Usermin at the same time"
echo "you can just accept the defaults."
Expand Down Expand Up @@ -238,7 +238,7 @@ else
echo ""

# Ask where perl is installed
echo "***********************************************************************"
echo "****************************************************************************"
echo "Usermin is written entirely in Perl. Please enter the full path to the"
echo "Perl 5 interpreter on your system."
echo ""
Expand Down Expand Up @@ -318,7 +318,7 @@ else
fi

# Ask for operating system type
echo "***********************************************************************"
echo "****************************************************************************"
if [ "$os_type" = "" ]; then
if [ "$autoos" = "" ]; then
autoos=2
Expand All @@ -335,7 +335,7 @@ else
echo ""

# Ask for web server port, name and password
echo "***********************************************************************"
echo "****************************************************************************"
echo "Usermin uses its own password protected web server to provide access"
echo "to the administration programs. The setup script needs to know :"
echo " - What port to run the web server on. There must not be another"
Expand Down Expand Up @@ -394,7 +394,7 @@ else
fi

# Copy files to target directory
echo "***********************************************************************"
echo "****************************************************************************"
if [ "$wadir" != "$srcdir" ]; then
echo "Copying files to $wadir .."
(cd "$srcdir" ; tar cf - . | (cd "$wadir" ; tar xf -))
Expand Down Expand Up @@ -805,20 +805,39 @@ if [ "$nostart" = "" ]; then
fi
echo ""
fi

echo "***********************************************************************"
echo "Usermin has been installed and started successfully. Use your web"
echo "browser to go to"
postactionmsg="installed"
postactionmsg2="started"
if [ "$upgrading" = "1" ]; then
postactionmsg="upgraded"
postactionmsg2="restarted"
fi
echo "****************************************************************************"
echo "Usermin has been $postactionmsg and $postactionmsg2 successfully."
echo ""
if [ "$nodepsmsg" = "" -a "$upgrading" != 1 ]; then
echo "Since Usermin was installed outside the package manager, ensure the"
echo "following recommended Perl modules and packages are present:"
echo " Perl modules:"
echo " - DateTime, DateTime::Locale, DateTime::TimeZone, Data::Dumper"
echo " - Digest::MD5, Digest::SHA, Encode::Detect, File::Basename"
echo " - File::Path, Net::SSLeay, Time::HiRes, Time::Local, Time::Piece"
echo " - lib, open"
echo " Packages:"
echo " - openssl - Cryptography library with TLS implementation"
echo " - shared-mime-info - Shared MIME information database"
echo " - tar gzip unzip - File compression and packaging utilities"
echo ""
fi
echo "Use your web browser to go to the following URL and login"
echo "with the name and password you entered previously:"
echo ""
host=`hostname`
if [ "$ssl" = "1" ]; then
echo " https://$host:$port/"
echo " https://$host:$port"
else
echo " http://$host:$port/"
echo " http://$host:$port"
fi
echo ""
echo "and login as any Unix user on your system."
echo ""
if [ "$ssl" = "1" ]; then
echo "Because Usermin uses SSL for encryption only, the certificate"
echo "it uses is not signed by one of the recognized CAs such as"
Expand Down

0 comments on commit c3ab067

Please sign in to comment.