Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 836496 Details for
Bug 1038328
/etc/cgconfig.conf ought to match production (and be closer to default)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
unset the "all" mounts of cgconfig.conf
restore_cgconfig_mounts.rb (text/x-ruby), 1.34 KB, created by
Vincent Batts
on 2013-12-13 20:56:23 UTC
(
hide
)
Description:
unset the "all" mounts of cgconfig.conf
Filename:
MIME Type:
Creator:
Vincent Batts
Created:
2013-12-13 20:56:23 UTC
Size:
1.34 KB
patch
obsolete
>#!/usr/bin/env ruby > >require 'tempfile' >require 'fileutils' > >=begin > # cpuset = /cgroup/all; > cpu = /cgroup/all; >=end >RE = /^(\s*#?\s*)(\w+)(\s*=\s*)\/cgroup\/all\s*;\s*$/ >FILE = "/etc/cgconfig.conf" > >def main(args) > orig_file = File.open(args.first || FILE) > bak_filename = "#{orig_file.path}.bak.#{$$}" > FileUtils.cp(orig_file.path, bak_filename) > $stderr.puts "backed up [#{orig_file.path}] to [#{bak_filename}]" > > tmp_file = Tempfile.open("cgconfig.") > in_mount = false > orig_file.each_line do |line| > in_mount = false if line.start_with?("}") && in_mount > if in_mount && line =~ RE > $stderr.puts "amending: #{$2}" > tmp_file.puts "#{$1}#{$2}#{$3}/cgroup/#{$2};" > else > tmp_file.puts line > end > # at the end, because we still want to see this line > in_mount = true if line.start_with?("mount") > end > orig_file.close > tmp_file.flush > tmp_file.seek(0) > > # Truncate before copying (since the new values aren't the same length as "all") > begin > orig_file = File.open(args.first || FILE, "w") > IO.copy_stream(tmp_file, orig_file) > $stderr.puts "compare with `diff -u #{bak_filename} #{orig_file.path}`" > rescue => ex > $stderr.puts ex > $stderr.puts "restored #{orig_file.path}" > FileUtils.cp(bak_filename, orig_file.path) > ensure > orig_file.close > tmp_file.close > end >end > >main(ARGV)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1038328
:
832891
|
832892
|
836496
|
836512
|
848376