$ gem install ohai
$ ohai platform
[2013-03-16T21:47:19+09:00] INFO: [inet6] no default interface, picking the first ipaddress
[
"mac_os_x"
]
$ gem install ohai
$ ohai platform
[2013-03-16T21:47:19+09:00] INFO: [inet6] no default interface, picking the first ipaddress
[
"mac_os_x"
]
chefはohaiを使ってplatformを判別しながらどのpackageマネージャを使うべきかなどを判断している