Jump to content

armbian-ramlog & armbian-truncate-log execution error


Recommended Posts

Posted

armbian-ramlog & armbian-truncate-log are not executed due to an error parsing the XTRA_RSYNC_TO=(--delete) from /etc/default/armbian-ramlog

This results in quick saturation of /var/log.

 

I've made some advancement in debugging "armbian-ramlog & armbian-truncate-log" complex, based on the master tree here:

https://github.com/armbian/build/blob/master/packages/bsp/common/usr/lib/armbian/armbian-ramlog

 

 

Your /usr/lib/armbian/armbian-ramlog has a syntax error in the array expression 

${XTRA_RSYNC_TO[@]+"${XTRA_RSYNC_TO[@]}"}

The 1st array lacks a closing } curly braces. Secondly, I can't figure out, why the same array is duplicated.

Even if you parse a variable XTRA_RSYNC_TO=(--delete) from /etc/default/armbian-ramlog, it will result in :

--delete+--delete

 

Another problem comes, when you call 

/usr/lib/armbian/armbian-ramlog write >/dev/null 2>&1

from /usr/lib/armbian/armbian-truncate-logs. It actually produces the error:

# /usr/lib/armbian/armbian-truncate-logs /usr/lib/armbian/armbian-truncate-logs: 23: /etc/default/armbian-ramlog: Syntax error: "(" unexpected

 

I believe there is a syntax error in the way the call is made, where the XTRA_RSYNC_TO=(--delete) variable is not accounted for.

 

Otherwise, if the XTRA_RSYNC_TO=(--delete) variable is remarked in /etc/default/armbian-ramlog

and "--delete" option is hard coded in /usr/lib/armbian/armbian-ramlog, the complex starts running without raising exceptions.

 

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines