Revision 0757c107
b/lib/backend.py | ||
---|---|---|
1706 | 1706 |
return False, ("File '%s' under path '%s' is missing (%s)" % |
1707 | 1707 |
(name, os_dir, _ErrnoOrStr(err))) |
1708 | 1708 |
|
1709 |
if stat.S_IMODE(st.st_mode) & stat.S_IXUSR != stat.S_IXUSR: |
|
1710 |
return False, ("File '%s' under path '%s' is not executable" % |
|
1711 |
(name, os_dir)) |
|
1712 |
|
|
1713 | 1709 |
if not stat.S_ISREG(stat.S_IFMT(st.st_mode)): |
1714 | 1710 |
return False, ("File '%s' under path '%s' is not a regular file" % |
1715 | 1711 |
(name, os_dir)) |
1716 | 1712 |
|
1713 |
if name in constants.OS_SCRIPTS: |
|
1714 |
if stat.S_IMODE(st.st_mode) & stat.S_IXUSR != stat.S_IXUSR: |
|
1715 |
return False, ("File '%s' under path '%s' is not executable" % |
|
1716 |
(name, os_dir)) |
|
1717 |
|
|
1718 |
|
|
1717 | 1719 |
os_obj = objects.OS(name=name, path=os_dir, |
1718 | 1720 |
create_script=os_files[constants.OS_SCRIPT_CREATE], |
1719 | 1721 |
export_script=os_files[constants.OS_SCRIPT_EXPORT], |
Also available in: Unified diff