/* 
Class: sol

Solaris-specific stuff; not complete yet

@unstable: solaris-all
@na: all

*/
class sol {

/*
Class: sol::network

Solaris networking, including routing
*/
class network {

/*
Class: sol::network::10

Networking on Solaris 10
*/
class 10 {

file { "/etc/inet/static_routes":
owner => root,
group => root,
mode => 644,
source => [ "puppet:///modules/sol/static_routes-${gstlocation}",
"puppet:///modules/sol/static_routes", ],
}

service { "routesetup":
name => $hardwareisa ? {
i386 => "/network/routing-setup",
sparc => "/network/initial",
},
provider => smf,
enable => true,
subscribe => File["/etc/inet/static_routes"],
require => File["/etc/inet/static_routes"],
}

}

/*
Class: sol::network::legacy

Networking on Solaris 8 and 9
*/
class legacy {

file { "/etc/init.d/static_routes":
owner => root,
group => root,
mode => 755,
source => [ "puppet:///modules/sol/S90static_routes-${gstlocation}",
"puppet:///modules/sol/S90static_routes", ],
}

file { "/etc/rc2.d/S90static_routes":
ensure => "/etc/init.d/static_routes",
}

exec { "routesetup":
command => "/etc/init.d/static_routes",
subscribe => File["/etc/init.d/static_routes"],
require => File["/etc/init.d/static_routes"],
refreshonly => true,
}
}

case $operatingsystemrelease {

5.10: {
include sol::network::10
}

5.8,5.9: {
include sol::network::legacy
}

}

# common to all solaris
file { "/etc/defaultrouter":
owner => root,
group => root,
mode => 644,
source => [ "puppet:///modules/sol/defaultrouter-${gstlocation}",
"puppet:///modules/sol/defaultrouter", ],
}

# common to all solaris
file { "/etc/netmasks":
owner => root,
group => root,
mode => 644,
source => [ "puppet:///modules/sol/netmasks-${gstlocation}",
"puppet:///modules/sol/netmasks", ],
}



}
}