Skip to content

Commit d119a2c

Browse files
committed
(profile::core::fiberspec) enable udev logs
1 parent 0ee81e8 commit d119a2c

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
# @summary
2-
# Manages Avantes Fiberspectrometer USB devices.
2+
# Manages Avantes Fiberspectrometer USB devices and udev configuration.
33
#
44
class profile::core::fiberspec {
55
systemd::udev::rule { 'fiberspec.rules':
66
rules => [
77
"SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1992\", ATTR{idProduct}==\"0667\", ACTION==\"add\", GROUP=\"saluser\", MODE=\"0664\"",
88
],
99
}
10+
11+
file_line { 'udev_log_debug':
12+
path => '/etc/udev/udev.conf',
13+
line => 'udev_log=debug',
14+
match => '^udev_log=.*$',
15+
replace => true,
16+
notify => Exec['reload_udev'],
17+
}
18+
19+
exec { 'reload_udev':
20+
command => '/sbin/udevadm control --reload',
21+
refreshonly => true,
22+
}
1023
}

spec/support/spec/fiberspec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,21 @@
88
]
99
)
1010
end
11+
12+
it do
13+
is_expected.to contain_file_line('udev_log_debug').with(
14+
path: '/etc/udev/udev.conf',
15+
line: 'udev_log=debug',
16+
match: '^udev_log=.*$',
17+
replace: true,
18+
notify: 'Exec[reload_udev]'
19+
)
20+
end
21+
22+
it do
23+
is_expected.to contain_exec('reload_udev').with(
24+
command: '/sbin/udevadm control --reload',
25+
refreshonly: true
26+
)
27+
end
1128
end

0 commit comments

Comments
 (0)