sunetdrive/functions/get_node_number.pp

5 lines
169 B
ObjectPascal
Raw Normal View History

2023-02-13 09:44:56 +00:00
# Lets determin where we are by looking at the hostname
function sunetdrive::get_node_number() >> Integer {
Integer(regsubst($::fqdn, /^[a-zA-Z\-]+(\d).*$/, '\\1'))
}