The following code does not work:
case $operatingsystemmajrelease {
'6': { $TOUCH = "/bin/touch"}
'7': { $TOUCH = "/usr/bin/touch"}
}
I also tried:
case $operatingsystemmajrelease {
"6": { $TOUCH='/bin/touch' }
"7": { $TOUCH='/usr/bin/touch' }
default: { fail('Operatingsystemmajrelease case default triggered.')}
}
I am basically trying to assign a value to a variable based on the CentOS major release.