Ronald J Yacketta wrote:
IIRC the cobbler dir under /var/www/cobbler (think that is the
default) is
recreated every time you run a cobbler sync. I ran into this when I placed
some files under cobbler/dir to use wget and noticed that the dir was
deleted after a syn.
I ended up creating a /var/www/html/scripts directory to hold my %post fun
Well, blow me - so it does.
Why does cobbler do this? And it does *explicitly* delete everything but
a set of dirs that "should" exist - the code is in action_sync.py:
if os.path.isdir(path):
if not x in ["web", "webui",
"localmirror","repo_mirror","ks_mirror","images","links","repo_profile","repo_system","svc","rendered"]
:
# delete directories that shouldn't exist
utils.rmtree(path)
if x in
["kickstarts","kickstarts_sys","images","systems","distros","profiles","repo_profile","repo_system","rendered"]:
# clean out directory contents
utils.rmtree_contents(path)
This seems a little draconian to me - why not just clean up the
directories that cobbler manages, i.e. remove the first clause that
deletes anything not in the list? What harm is there in leaving them there?
R.