Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4386 installation problem - failed to detect operating system (on generic linux machine) - solution included

1.670
closed-works-for-me
nobody
5
2014-08-14
2014-03-07
Tomáš Novosad
No

I'v just downloaded webmin 1.670 src.rpm package and re-packet it into our (CentOs based) distribution. But new rpm failed to install on our system.

rpm install command failed with prein script failure with this error:
Unable to identify operating system
error: %pre(webmin-1.670-lb6.01.noarch) scriptlet failed, exit status 2

Our system is ussualy detected as "generic linux"
such detection is made by command "uname -r" run in preinst script of the rpm package.
such command produces this line on our system "3.10.33lb6.01"
However this is matched against regular expression "/^([0-9]+\.[0-9+])\./"

Obviously the regexp in prein script is wrong - match for second digit is "[0-9+]" but should be "[0-9]+".
The error i in package rpm SPECFILE.

After fixing the rpm prein scrtip, webmin still failed to properly install, as the same error is also in webmin os_list.txt file.
webmin setup.sh fail to produce config files as it finish with this error "Failed to detect operating system" reported in webmin-setup.out file.

I do not know how to inform directly person responsible for the files (os_lists.txt and rpm SPEC file), therefore i've filed this bug report.

Thank You and wish You a nice day

Tomas Novosad

Discussion

  • Jamie Cameron
    Jamie Cameron
    2014-03-07

    If your system runs CentOS, Webmin shouldn't detect it as "Generic Linux".

    What do the /etc/issue and /etc/redhat-release files contain on your system?

     
  • Hello,

    /etc/redhat-release is no more included in CentOS ditributions (i guess this is the case since CentoOS 6 release)

    /etc/issue is customized for our distribution
    [root@xxxxxxx ~]# cat /etc/issue
    LinuxBox6
    Kernel \r on an \m

    [root@xxxxxxx ~]# cat /etc/redhat-release
    cat: /etc/redhat-release: No such file or directory

    this is uname command output
    [root@xxxxxxx ~]# uname -r
    3.10.33lb6.01

    the string 3.10 is not parsed during installation, because of mistake in regexp

    Thanks for help.

    Tomas Novosad

     
  • Jamie Cameron
    Jamie Cameron
    2014-03-20

    How about /etc/centos-release .. what does that contain?

     
  • Oops, it turns out we do not have such file.
    I got info from my colleague who is responsible for our distro, that we replace that file with our own /etc/lbox-release.

    Therefore our distribution used to be detected as "generic-linux".
    I'm perfectly fine with that, it is no problem.

    But on last installation, there is 3.10 kernel and system detection failed completely.

    I do not need to detect the system as centos, generic-linux is just fine for me.
    But the problem described in original message prevents the detection completely.

     
  • Jamie Cameron
    Jamie Cameron
    2014-03-21

    If your distro is substantially the same as CentOS, you really don't want it to be detected as Generic Linux - many modules either won't work, or will be incorrectly configured by default. So I'd suggest putting back the /etc/centos-release file.

     
  • All right then, i'll discuss with my colleague to put that file back.

    In fact, we've no problem even when detected as generic linux.
    Fact is we're using ounly our custom-made modules. Som of them, however rely on std. webmin modules.
    We're running this setup (generic-linux) for over 10 months on 40+ servers without the problem.

    Having our distro correctly detected ad centos should only be usefull, so i will try to get it working.

    As for this ticket itself, i guess it can be closed/rejected, whatever.

    Thanks for help

     
  • Jamie Cameron
    Jamie Cameron
    2014-03-28

    If you are just running your own custom modules, detection as generic linux will mostly work OK.

     
  • Jamie Cameron
    Jamie Cameron
    2014-03-28

    • status: open --> closed-works-for-me