Skip to content

Commit 44ca319

Browse files
author
Paul Gale
committed
Make sed executable path explicit
1 parent c19cd28 commit 44ca319

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
$qvalue = shellquote("${value}")
9191
# lint:endignore
9292
exec { "enforce-sysctl-value-${qtitle}":
93-
unless => "/usr/bin/test \"$(/sbin/sysctl -n ${qtitle} | sed -r 's/[ \t]+/ /g')\" = ${qvalue}",
93+
unless => "/usr/bin/test \"$(/sbin/sysctl -n ${qtitle} | /usr/bin/sed -r -e 's/[ \t]+/ /g')\" = ${qvalue}",
9494
command => "/sbin/sysctl -w ${qtitle}=${qvalue}",
9595
}
9696
}

spec/classes/sysctl_base_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
describe 'sysctl::base', :type => :class do
44

5+
let(:facts) do
6+
{
7+
:osfamily => 'RedHat',
8+
:operatingsystemmajrelease => '8',
9+
}
10+
end
11+
512
it { should create_class('sysctl::base') }
613
it { should contain_file('/etc/sysctl.d') }
714

spec/defines/sysctl_init_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
describe 'sysctl', :type => :define do
44
let(:title) { 'net.ipv4.ip_forward'}
55

6+
let(:facts) do
7+
{
8+
:osfamily => 'RedHat',
9+
:operatingsystemmajrelease => '8',
10+
}
11+
end
12+
613
context 'present' do
714
let(:params) { { :value => '1' } }
815

0 commit comments

Comments
 (0)