From: Jamie C. <jca...@we...> - 2003-10-05 05:22:19
|
Gavin Nelmes-Crocker wrote: >>If you are willing to modify the RPM, the best solution would be to add >>a line to the os_list.txt file in the webmin root directory, like : >> >>YourLinux 1.0 redhat-linux 1.0 $etc_issue >>=~ /YourLinux/ >> >>The first two fields are the OS name and version as shown to the >>user, while >>the second two are the actual OS code and version used by webmin >>internally. >>The final field is a piece of Perl code for detecting the OS, in which >>the variable $etc_issue will contain the contents of your /etc/issue file. >>All fields MUST be separated by tabs .. See the other lines in >>the os_list.txt >>file for more examples. > > > Sorry to go back to this but I thought it was fixed until I came to test it > after doing some other stuff - now after spending a couple of hours > tinkering I'm admitting I'm doing something I don't fully understand. I'm > happy modifying the rpm as this is the way I need it for final but I'm > struggling with a really small but crucial bit. I have I hope put all the > details required below. > > I have the following in /etc/issue > > Sheriff Linux release 1.0 (LongReef) > Kernel \r on an \m > > I have the following in /etc/sheriff-release (which replaces redhat-release) > > Sheriff Linux release 1.0 (LongReef) > > I have added the following line to the webmin spec file and it seems to > detect the OS correctly > > if (\$etc_issue =~ /Sheriff.*\\s1\\.0\\s/i || \`cat /etc/sheriff-release > 2>&1\` =~ /\\s1\\.0\\s/) { > print "oscheck='Sheriff Linux 1.0'\\n"; > > I have added the following line to os_text > > Sheriff Linux 1.0 redhat-linux 8.0 $etc_issue > =~ /Sheriff.*\s1\.0\s/i > > which I copied form the Debian install - in fact I've tried several > variations of the above initially copying the redhat line as the OS is based > entirely on Redhat 8.0 plus modifications. > > Anyway the net result is this when I do cat /tmp/.webmin/webmin-setup.out > > *********************************************************************** > * Welcome to the Webmin setup script, version 1.110 * > *********************************************************************** > Webmin is a web-based interface that allows Unix-like operating > systems and common Unix services to be easily administered. > > Installing Webmin in /usr/libexec/webmin ... > > *********************************************************************** > Webmin uses separate directories for configuration files and log files. > Unless you want to run multiple versions of Webmin at the same time > you can just accept the defaults. > > Config file directory [/etc/webmin]: Log file directory [/var/webmin]: > *********************************************************************** > Webmin is written entirely in Perl. Please enter the full path to the > Perl 5 interpreter on your system. > > > Testing Perl ... > Perl seems to be installed ok > > *********************************************************************** > Failed to detect operating system > > So somewhere I have not got the OS detect correct I presume a mistake in the > os_list bit but I can't se where or why. > > Help please I know it is so close but at the same time so far, knowing the > answer will probably point me in the direction of understanding the concept > further. From that error, it looks like the line in os_list.txt isn't correct - make sure the regular expression for detecting the OS is correct. - Jamie |