Skip to content

How to set file mode but ignore content? #156

Answered by CyberShadow
infokiller asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible?

You could do this by using the content of the file on the system:

cat /etc/file > "$(CreateFile /etc/file)"

I then kept getting this error in subsequent runs, even after I reverted the config change, since apparently $tmp_dir is not cleaned up between runs.

Whoops, "$tmp_dir"/file-owners indeed should have been cleared on every run. Fixed in 1c62749.

Why is this the case? are there caching benefits?

Yes, not clearing $tmp_dir enables --skip-inspection and --skip-config.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@infokiller
Comment options

Answer selected by infokiller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants