From c3ab067c07606cf2e0db908f3b6ab3233fd0539a Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 13 Oct 2023 15:43:25 +0300 Subject: [PATCH] Add user-friendly dependency list if installed manually [build] --- makerpm.pl | 3 ++- setup.sh | 51 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/makerpm.pl b/makerpm.pl index 0978e74f..83815be2 100755 --- a/makerpm.pl +++ b/makerpm.pl @@ -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 diff --git a/setup.sh b/setup.sh index 073b8635..47e830ac 100755 --- a/setup.sh +++ b/setup.sh @@ -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 "" @@ -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." @@ -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 "" @@ -318,7 +318,7 @@ else fi # Ask for operating system type - echo "***********************************************************************" + echo "****************************************************************************" if [ "$os_type" = "" ]; then if [ "$autoos" = "" ]; then autoos=2 @@ -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" @@ -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 -)) @@ -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"