Revision 645bba3a lib/client/gnt_cluster.py
b/lib/client/gnt_cluster.py | ||
---|---|---|
1723 | 1723 |
|
1724 | 1724 |
""" |
1725 | 1725 |
failed = [] |
1726 |
failed.extend(_VerifyCommand( |
|
1727 |
["rm", "-f", os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")])) |
|
1728 |
failed.extend(_VerifyCommand( |
|
1729 |
["ln", "-s", "-f", os.path.join(pathutils.PKGLIBDIR, versionstring), |
|
1730 |
os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")])) |
|
1731 |
failed.extend(_VerifyCommand( |
|
1732 |
["rm", "-f", os.path.join(pathutils.SYSCONFDIR, "ganeti/share")])) |
|
1733 |
failed.extend(_VerifyCommand( |
|
1734 |
["ln", "-s", "-f", os.path.join(pathutils.SHAREDIR, versionstring), |
|
1735 |
os.path.join(pathutils.SYSCONFDIR, "ganeti/share")])) |
|
1726 |
if constants.HAS_GNU_LN: |
|
1727 |
failed.extend(_VerifyCommand( |
|
1728 |
["ln", "-s", "-f", "-T", |
|
1729 |
os.path.join(pathutils.PKGLIBDIR, versionstring), |
|
1730 |
os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")])) |
|
1731 |
failed.extend(_VerifyCommand( |
|
1732 |
["ln", "-s", "-f", "-T", |
|
1733 |
os.path.join(pathutils.SHAREDIR, versionstring), |
|
1734 |
os.path.join(pathutils.SYSCONFDIR, "ganeti/share")])) |
|
1735 |
else: |
|
1736 |
failed.extend(_VerifyCommand( |
|
1737 |
["rm", "-f", os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")])) |
|
1738 |
failed.extend(_VerifyCommand( |
|
1739 |
["ln", "-s", "-f", os.path.join(pathutils.PKGLIBDIR, versionstring), |
|
1740 |
os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")])) |
|
1741 |
failed.extend(_VerifyCommand( |
|
1742 |
["rm", "-f", os.path.join(pathutils.SYSCONFDIR, "ganeti/share")])) |
|
1743 |
failed.extend(_VerifyCommand( |
|
1744 |
["ln", "-s", "-f", os.path.join(pathutils.SHAREDIR, versionstring), |
|
1745 |
os.path.join(pathutils.SYSCONFDIR, "ganeti/share")])) |
|
1736 | 1746 |
return list(set(failed)) |
1737 | 1747 |
|
1738 | 1748 |
|
Also available in: Unified diff