diff options
-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 |