Giter Club home page Giter Club logo

Comments (3)

mattburgess avatar mattburgess commented on September 25, 2024

This looks remarkably like https://projects.puppetlabs.com/issues/11988 but that's just over 2 years old now so I can't imagine we're being hit by this now.

Note that the symlink is from /etc/selinux/config to /etc/sysconfig/selinux.

from puppet-system.

mvdejong avatar mvdejong commented on September 25, 2024

I can confirm that it still happens in version 0.7.4. While the functional changes to the file are executed by the augeas-provider, which can handle softlinks, a header "# Managed by puppet" is inserted using the posix-provider.

This is done from the manifest at system/manifests/sysconfig/header.pp :

define system::sysconfig::header (
  $schedule = undef,
) {
  $file = $title
  exec { "sysconfig-${file}-empty":
    command  => "/bin/echo > /etc/sysconfig/${file}",
    unless   => "/usr/bin/test -s /etc/sysconfig/${file}",
    schedule => $schedule,
  }
  exec { "sysconfig-${file}-header":
    command  => "/bin/sed -i '1i# Managed by puppet' /etc/sysconfig/${file}",
    unless   => "/bin/grep -w '^# Managed by puppet' /etc/sysconfig/${file}",
    require  => Exec["sysconfig-${file}-empty"],
    schedule => $schedule,
  }
}

It is that silly "sed" command which nukes the symlink. The solution is simple : use the "--follow-symlinks" option on the command. That option is not available for all sed-implementations, but since issue #13 and #14 suggest that this module is knowingly limited to the RedHat-family, there is no reason not to included it.

from puppet-system.

bastelfreak avatar bastelfreak commented on September 25, 2024

Hi,
based on a discussion in https://groups.io/g/voxpupuli/message/449 we decided to archive this repository. I'm going to close all issues and PRs. If you're interested in maintaining the module, please respond to our mailinglist.

from puppet-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.