Skip to content

Instantly share code, notes, and snippets.

@Arbow
Created November 26, 2008 06:16
Show Gist options
  • Save Arbow/29310 to your computer and use it in GitHub Desktop.
Save Arbow/29310 to your computer and use it in GitHub Desktop.
import platform
system, _, release, version, machine, processor = platform.uname()
system, release, version = platform.system_alias(system, release,version)
if (system == 'Darwin' and release == '9.1.0'):
#操作系统为Mac OSX 10.5
chroot_path = "/"
namedconf = "/etc"
elif (system == "FreeBSD" and release[:3] == "7.0"):
#操作系统为FreeBSD 7.0
chroot_path = "/var/named"
namedconf = "/etc/namedb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment