Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5646

[RFE] chkconfig is not part of default installation anymore, and fails to install if /etc/init.d preexists

    • None
    • Moderate
    • sst_cs_plumbers
    • ssg_core_services
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      Because chkconfig is not installed by default any more in RHEL9, we are seeing issues when it's installed afterwards, when a 3rd party tool is already installed and created /etc/init.d directory, instead of the link to /etc/rc.d/init.d

      Because chkconfig is not able to decide what to do with this directory, the request here is to print a warning during the installation instead just a fail or pyton backtrace.
      Thus user can identify and fix the issue.

      Version-Release number of selected component (if applicable):
      chkconfig-1.20-2.el9.x86_64
      RHEL9

      How reproducible:
      always

      Steps to Reproduce:
      1. simulate a faulty install of an init script in /etc/init.d: mkdir /etc/inid.d
      2. yum install chkconfig
      3.

      Actual results:
      Non understandable Error:


      Installing:
      chkconfig x86_64 1.20-2.el9
      ...
      Running transaction check
      Transaction check succeeded.
      Running transaction test
      Transaction test succeeded.
      Running transaction
      Preparing : 1/1
      Installing : chkconfig-1.20-2.el9.x86_64 1/1
      Error unpacking rpm package chkconfig-1.20-2.el9.x86_64
      Errors occurred during transaction.
      Verifying : chkconfig-1.20-2.el9.x86_64 1/1
      Completion plugin: Generating completion cache...
      Installed products updated.
      User-Agent: constructed: 'libdnf (Red Hat Enterprise Linux 9.0; generic; Linux.x86_64)'
      ...
      rhel-9-for-x86_64-sap-netweaver-e4s-rpms: using metadata from Thu 19 May 2022 02:39:34 PM CEST.
      Last metadata expiration check: 0:00:01 ago on Mon 29 Aug 2022 12:03:01 PM CEST.
      Failed: chkconfig-1.20-2.el9.x86_64

      Failed:
      chkconfig-1.20-2.el9.x86_64

      Error: Transaction failed

      Expected results:

      • An explicit warning from the preinstall script:

      "The /etc/init.d directory already exists, please check the content and remove it as it is in conflict with chkconfig"

      Of course, the real fix must done in the broken script, but a warning will help customer to identify the issue.

      Additional info:
      With detail output, we can identify the issue, but in a lot of data:
      ~~~
      D: create 040755 1 ( 0, 0) 0 /etc/chkconfig.d
      D: Plugin: calling hook fsm_file_prepare in selinux plugin
      D: create 120777 1 ( 0, 0) 11 /etc/init.d;630dcf56
      D: Plugin: calling hook fsm_file_prepare in selinux plugin
      fdio: 8 reads, 263 total bytes in 0.000847 secs
      error: unpacking of archive failed on file /etc/init.d: cpio: File from package already exists as a directory in system
      ~~~

            lnykryn@redhat.com Lukáš Nykrýn
            rhn-support-bwelterl Benoit Welterlen
            Lukáš Nykrýn Lukáš Nykrýn
            qe-baseos-daemons qe-baseos-daemons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: