Hide Forgot
Created attachment 821523 [details] suggested fix Description of problem: I didn't look too deep into this but doesn't the following "find" line in /etc/cron.daily/prelink look suspicious? It's seems as a line is missing. [ "`find /var/lib/prelink/quick -mtime -${PRELINK_NONRPM_CHECK_INTERVAL:-7} 2>/dev/null`" \ -a -f /var/lib/rpm/Packages \ -a /var/lib/rpm/Packages -ot /var/lib/prelink/quick ] && exit 0 The bourne shell static analyzer "shellcheck" also complains: # shellcheck /etc/cron.daily/prelink In /etc/cron.daily/prelink line 27: elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \ ^-- The mentioned parser error was in this elif clause. In /etc/cron.daily/prelink line 33: [ "`find /var/lib/prelink/quick -mtime -${PRELINK_NONRPM_CHECK_INTERVAL:-7} 2>/dev/null`" \ ^-- Couldn't parse this test expression. In /etc/cron.daily/prelink line 34: -a -f /var/lib/rpm/Packages \ ^-- Unexpected "/". Fix any mentioned problems and try again. Version-Release number of selected component (if applicable): prelink-0.4.6-3.1.el6_4.x86_64 How reproducible: Always Steps to Reproduce: 1. - 2. - 3. - Actual results: - Expected results: - Additional info: I've attached a patch suggestion. (The same issue can be found in RHEL 5.10.)
Well, adding an explicit "-n" in front of the string makes "shellcheck" happy, too. [ -n "`find /var/lib/misc/prelink.quick -mtime -${PRELINK_NONRPM_CHECK_INTERVAL:-7} 2>/dev/null`" \ Sorry, I guess this was a false alarm.
Man page for test says: STRING equivalent to -n STRING and given that find shouldn't print anything other than /var/lib/misc/prelink.quick or empty string and thus there are no - or ! characters in there, I think the script is fine.
Yes, I agree. Sorry! I'll file a shellcheck bug instead.