403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/preupgrade/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/preupgrade/misc.pyc
Ñò
ˆnJc@s¦ddkZddkZddkZd„Zd„Zdd„Zd„Zd„Zdd	d
„Zd„Z	d„Z
ddd
„Zddd„Z
ddd„ZdS(iÿÿÿÿNcCsžt}tiidƒotStiidƒoiyOtddƒ}|iƒ}|iƒt|idƒƒdjo
t	}nWqšt
j
oqšXn|S(s
    This function determines if the running system is a paravirt guest.
    This code is borrowed heavily from rhnreg.py (packaged with rhn-setup).
       2.  Check /sys/hypervisor/uuid.  If exists and is non-zero, we know
           the system is a para-virt guest; exit.
    s/proc/xen/xsd_ports/sys/hypervisor/uuidtrs0-
i(tFalsetostpathtexiststopentreadtclosetlentstriptTruetIOError(tisGuestt	uuid_filetuuid((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pyt
isParaVirts
	cCsd}d}tit|ƒ|dtƒ}x^toV|iƒ}|pPn|djo-|iƒ}|djo|iƒ}q†q-q-W|S(Nten_USs/etc/sysconfig/i18ntposixtLANGt=(tshlexRR
t	get_token(tlangtinfiletsttteq((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pytgetlang-s

icCs dddddg}|djodSx&|D]\}}||joPq.q.W|djod
t|ƒ||fSdt|ƒdt|ƒ||fSdS(s6Return a string representing the "human-readable" sizeil(tTBltGBltMBl
tkBtbytess1 byteis%d%ss%.sf%sNl(lRl(lRl (l Rl(lR(isbytes(tinttstrtfloat(tsizet	precisiontabbrtfactortsuffix((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pythrsize;s	

	
cCs©d}d}yƒtit|ƒ|dtƒ}x^|oV|iƒ}|pPn|djo-|iƒ}|djo|iƒ}q‰q0q0WWntj
onX|S(srReturn the value of KEYTABLE in /etc/sysconfig/keyboard, or None
    if the file is missing or KEYTABLE is not sets/etc/sysconfig/keyboardRtKEYTABLERN(tNoneRRR
RR(tlayoutRRRR((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pytget_sysconfig_keymapLs 

cCstƒpdS(s2Get the system keymap from /etc/sysconfig/keyboardtus(R-(((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pyt	getkeymap_ssupgrade fedoratcCsKd||||f}|djo|d|}nd|GHti|ƒS(sRun /sbin/grubby to create an entry for the given kernel+initrd.
    Overwrites any existing entries for the given kernel path.sN/sbin/grubby --title="%s" --remove-kernel="%s" --add-kernel="%s" --initrd="%s"R0s --args="%s"sDEBUG %s(Rtsystem(tkerneltinitrdttitletargstcmd((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pytgrubbyds

	cCs
tidƒS(sVTell grubby to make the newly-added boot entry the default for the
    next boot only.sB/bin/echo 'savedefault --default=0 --once' | /sbin/grub >/dev/null(RR1(((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pytgrubby_make_next_boot_onlyoscCstid|ƒS(sBMake the given kernel path the default kernel for subsequent bootss/sbin/grubby --set-default=%s(RR1(R2((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pytgrubby_make_defaulttscCs’yddkl}t}Wn9tj
o-tiidƒddkl}t}nXy||||ƒWn!|t	fj
o}|GHt
SXtS(s&Run createrepo on the given directory.iÿÿÿÿ(tMDErrors/usr/share/createrepo(t
createrepoR:tgenerate_repodata_f9tImportErrortsysRtappendtdumpMetadatatgenerate_repodata_f8RRR
(tdirtcompstcallbackR:tgenerate_repodatate((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pyRExs
cCs|ddkl}l}|ƒ}||_t|_|o
||_n|d|d|ƒ}|iƒ|iƒ|i	ƒdS(s?Run createrepo (from Fedora 9 or later) on the given directory.iÿÿÿÿ(tMetaDataGeneratortMetaDataConfigt
config_objRDN(
R;RGRHt	directoryR
tdatabaset	groupfilet
doPkgMetadatatdoRepoMetadatatdoFinalMove(RBRCRDRGRHtconftmdgen((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pyR<Šs			


cCs=ddkl}l}dg}|o|id|gƒn|i|ƒ||ƒ\}}tii|d|dƒ}tii|d|dƒ}	x\||	fD]N}
tii|
ƒot	i
|
ƒq£tii|
ƒoti|
ƒq£q£Wti
|ƒ||ƒ}|i|dƒ|iƒti||	ƒd	S(
s6Run createrepo (from Fedora 8) on the given directory.iÿÿÿÿ(RGt	parseArgss
--databases--groupfilet	outputdirttempdirtfinaldiriN(tgenpkgmetadataRGRRtextendR?RRtjointisdirtshutiltrmtreeRtunlinktmkdirRMRNtrename(RBRCRDRGRRR5tcmdstdirsRTRUtdRQ((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pyRA—s&	



(RR>RRRR)R-R/R7R8R9R+RER<RA(((s3/usr/lib/python2.6/site-packages/preupgrade/misc.pyt<module>s						

Youez - 2016 - github.com/yon3zu
LinuXploit