diff options
author | P. J. McDermott <pjm@nac.net> | 2012-01-27 21:34:27 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-01-27 21:34:27 (EST) |
commit | 9a57b7fe5fcbbaff344031c67c9082d56c9410bb (patch) | |
tree | a4c6a87caa6ece54d8e88b606370d83b1e215971 /src | |
parent | 5746c539f77acdcd5a895aec36b8a1ac509b3479 (diff) |
Prevent large '[' commands.
Diffstat (limited to 'src')
-rw-r--r-- | src/oh-gencontrol | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/oh-gencontrol b/src/oh-gencontrol index 6505920..a54596e 100644 --- a/src/oh-gencontrol +++ b/src/oh-gencontrol @@ -136,7 +136,7 @@ gen_control_bin() if [ -d ${data_dir}/etc ]; then find ${data_dir}/etc -type f | sed "s@^${data_dir}@@" \ >> ${control_dir}/conffiles - if [ -z "$(cat ${control_dir}/conffiles)" ]; then + if [ -z "$(head -n 1 ${control_dir}/conffiles)" ]; then rm -f ${control_dir}/conffiles else chmod 644 ${control_dir}/conffiles @@ -146,7 +146,7 @@ gen_control_bin() # MD5 checksums. find ${data_dir} -type f | sed "@^${data_dir}@@" | sort | xargs md5sum \ > ${control_dir}/md5sums - if [ -z "$(cat ${control_dir}/md5sums)" ]; then + if [ -z "$(head -n 1 ${control_dir}/md5sums)" ]; then rm -f ${control_dir}/md5sums else chmod 644 ${control_dir}/md5sums |