|
138 | 138 | # Define how long (in seconds) that the menu should appear |
139 | 139 | # INTEGER : 5 |
140 | 140 | # |
| 141 | +# [*timeout_style*] |
| 142 | +# Define what to display while waiting for timeout to expire |
| 143 | +# STRING : 'countdown' |
| 144 | +# |
141 | 145 | # [*tune*] |
142 | 146 | # Define if GRUB should make a beep when he starts |
143 | 147 | # STRING : Empty by default |
|
205 | 209 | Boolean $enable_cryptodisk = $grub2::params::enable_cryptodisk, |
206 | 210 | String $gfxmode = $grub2::params::gfxmode, |
207 | 211 | Optional[String] $hidden_timeout = $grub2::params::hidden_timeout, |
208 | | - Boolean $hidden_timeout_quiet = $grub2::params::hidden_timeout_quiet, |
| 212 | + Optional[Boolean] $hidden_timeout_quiet = $grub2::params::hidden_timeout_quiet, |
209 | 213 | Stdlib::Absolutepath $install_binary = $grub2::params::install_binary, |
210 | 214 | Boolean $install_grub = $grub2::params::install_grub, |
211 | 215 | Boolean $remove_grub_legacy = $grub2::params::remove_grub_legacy, |
|
223 | 227 | Boolean $suse_btrfs_snapshot_booting = $grub2::params::suse_btrfs_snapshot_booting, |
224 | 228 | String $terminal = $grub2::params::terminal, |
225 | 229 | Integer $timeout = $grub2::params::timeout, |
| 230 | + String $timeout_style = $grub2::params::timeout_style, |
226 | 231 | String $tune = $grub2::params::tune, |
227 | 232 | Stdlib::Absolutepath $update_binary = $grub2::params::update_binary, |
228 | 233 | Boolean $update_grub = $grub2::params::update_grub, |
229 | 234 | ) inherits grub2::params { |
| 235 | + |
| 236 | + # Warn if timeout_style and either of the hidden_timout values are set, and respect old syntax |
| 237 | + if defined('$timeout_style') and ( $hidden_timeout_quiet =~ Boolean or $hidden_timeout =~ String) ) { |
| 238 | + notify { 'Newer timeout_style and at least one of deprecated hidden_timeout(_quiet)? defined at the same time. Using deprecated syntax, but you should fix this.': } |
| 239 | + $timeout_style_disable = true |
| 240 | + } else { |
| 241 | + $timeout_style_disable = false |
| 242 | + } |
| 243 | +} |
| 244 | + |
230 | 245 | anchor { 'grub2::begin': } |
231 | 246 | -> class { '::grub2::install': } |
232 | 247 | ~> class { '::grub2::config': } |
|
0 commit comments