Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402109 - sys-apps/cciss_vol_status-1.09 bad cron file line return breaks awk/variable
Summary: sys-apps/cciss_vol_status-1.09 bad cron file line return breaks awk/variable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 23:08 UTC by William L. Thomson Jr.
Modified: 2012-02-04 22:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William L. Thomson Jr. 2012-02-03 23:08:55 UTC
When invoked you get the following

# /etc/cron.daily/cciss_vol_status
cciss_vol_status: open cciss/c0d0:: No such file or directory
cciss_vol_status: open 1009.24GB: No such file or directory
cciss_vol_status: open RAID: No such file or directory
cciss_vol_status: open 5: No such file or directory

This is due to a line return breaking the awk/variable, following fix/patch suggested



diff -Naur /etc/cron.daily/cciss_vol_status /usr/portage/sys-apps/cciss_vol_status/files/cciss_vol_status.cron 
--- /etc/cron.daily/cciss_vol_status    2012-02-03 18:05:32.000000000 -0500
+++ /usr/portage/sys-apps/cciss_vol_status/files/cciss_vol_status.cron  2012-01-27 08:12:41.000000000 -0500
@@ -5,7 +5,8 @@
 STATUS=0
 
 if [ -d /proc/driver/cciss ]; then
-   DEVS=`grep -h 'cciss/c.*d0:' /proc/driver/cciss/cciss* |awk -F: '{print "/dev/"$1}'`
+   DEVS=`grep -h 'cciss/c.*d0:' /proc/driver/cciss/cciss* |awk -F: '{print
+"/dev/" $1}'`
    OUTPUT=`/usr/bin/cciss_vol_status $DEVS`
    if [ $? -ne 0 ];  then
         printf "%s\n" "$OUTPUT"
Comment 1 William L. Thomson Jr. 2012-02-03 23:11:21 UTC
That patch looks funny, but there is a line return casing "/dev/" $1}'` to end up on a new line, instead of part of the first. Its longer than the 80 characters or what ever for normal terminals and something line wrapped it with a return. Guess you could go with a \, but removing the line return works the same.
Comment 2 William L. Thomson Jr. 2012-02-03 23:13:11 UTC
The patch was reversed, doh :)


diff -Naur /usr/portage/sys-apps/cciss_vol_status/files/cciss_vol_status.cron /etc/cron.daily/cciss_vol_status
--- /usr/portage/sys-apps/cciss_vol_status/files/cciss_vol_status.cron  2012-01-27 08:12:41.000000000 -0500
+++ /etc/cron.daily/cciss_vol_status    2012-02-03 18:05:32.000000000 -0500
@@ -5,8 +5,7 @@
 STATUS=0
 
 if [ -d /proc/driver/cciss ]; then
-   DEVS=`grep -h 'cciss/c.*d0:' /proc/driver/cciss/cciss* |awk -F: '{print
-"/dev/" $1}'`
+   DEVS=`grep -h 'cciss/c.*d0:' /proc/driver/cciss/cciss* |awk -F: '{print "/dev/"$1}'`
    OUTPUT=`/usr/bin/cciss_vol_status $DEVS`
    if [ $? -ne 0 ];  then
         printf "%s\n" "$OUTPUT"
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2012-02-04 22:20:25 UTC
Please attach the patch using the 'add an attachment' facility provided. The last thing we want is for your submission to be mangled in ways that makes it impossible to apply or do the wrong thing. Thank you.
Comment 4 William L. Thomson Jr. 2012-02-04 22:29:46 UTC
Its just a simple line return that needs to be removed from the installed cron file and the ebuild revision bumped to reflected a modification in installed files. Really can't believe anyone with commit access would comment on the bug rather than just fix it... But I know the proper process for attaching a patch. Just was trying to show its a very simple modification, without having to make a stand alone patch file and attach that. Just was doing a diff of the modified installed file and copy of what is in portage and gets installed.
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2012-02-04 22:38:59 UTC
The bug that is reported could only exist in 1.09-r1 but was reported for 1.09; the unified diff was first inverted and then line-wrapped. I am simply trying to make sure that the fix reaches me in a usable format.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-04 22:41:54 UTC
Fixed in CVS properly, getting rid of using both grep+awk, to just awk.