SOLVED: 'unknown': I need something more specific.

Chris
Site Admin
Posts: 136
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium

SOLVED: 'unknown': I need something more specific.

Post by Chris »

I get the following errors when cron executes scripts

'unknown': I need something more specific.

It is new, since the last update of cronie.
It happens on several script. (But not all)
The version is : cronie (OpenRC) 0.63
Chris
Site Admin
Posts: 136
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium

Re: 'unknown': I need something more specific.

Post by Chris »

I found a work around,
put all the output of the script to /dev/null in cron,
so it doesn't send mails.

Code: Select all

test.sh > /dev/null 2>&1
But this is not exactly what I want.
I want to know the rootcause.
Chris
Site Admin
Posts: 136
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium

Re: 'unknown': I need something more specific.

Post by Chris »

After a lot of searching a found the problem.

the command less is used in my script.
Under normal use, under my login in bash it is
/usr/bin/less but is the same in /bin/less, /sbin/less and /usr/sbin/less -> vesion: less 692 (PCRE2 regular expressions)
Works perfect without problem.

But not when launched by cron ...
Replacing it with cat in the script solved it.

cat does display entire file content.
and less views file with pagination.
So it does make more sence using cat.
It work before version 692, just with the latest update it broke.