def tftpboot_location():
 (make, version) = os_release()
 str_version = str(version)
 if (make in ('fedora', 'redhat', 'centos', 'virtuozzo')):
  return '/var/lib/tftpboot'
 elif (make == 'suse'):
  return '/srv/tftpboot'
 elif ((make == 'ubuntu') and os.path.exists('/var/lib/tftpboot')):
  return '/var/lib/tftpboot'
 elif ((make == 'ubuntu') and os.path.exists('/srv/tftp')):
  return '/srv/tftp'
 elif ((make == 'debian') and (int(str_version.split('.')[0]) < 6)):
  return '/var/lib/tftpboot'
 elif ((make == 'debian') and (int(str_version.split('.')[0]) >= 6)):
  return '/srv/tftp'
 else:
  return '/tftpboot'

def tftpboot_location ( ) : ( make , version ) = os_release ( ) str_version = str ( version ) if ( make in ( 'fedora' , 'redhat' , 'centos' , 'virtuozzo' ) ) : return '/var/lib/tftpboot' elif ( make == 'suse' ) : return '/srv/tftpboot' elif ( ( make == 'ubuntu' ) and os . path . exists ( '/var/lib/tftpboot' ) ) : return '/var/lib/tftpboot' elif ( ( make == 'ubuntu' ) and os . path . exists ( '/srv/tftp' ) ) : return '/srv/tftp' elif ( ( make == 'debian' ) and ( int ( str_version . split ( '.' ) [ 0 ] ) < 6 ) ) : return '/var/lib/tftpboot' elif ( ( make == 'debian' ) and ( int ( str_version . split ( '.' ) [ 0 ] ) >= 6 ) ) : return '/srv/tftp' else : return '/tftpboot'
guesses the location of the tftpboot directory .