Jump to content

Bug - cron openmediavault not working after updates to armbian


Franky66
 Share

Recommended Posts

Some days ago I installed the latest armbian updates to my armbian buster installation / openmediavault 5 on my odroid n2. After the installation of the following updates the cron jobs, which were setup on omv5 gui (not in crontab os) are not working anymore and are not started because of error:

 

Here the update packages:

 

armbian-config 20.08 armbian-firmware 20.08 linux-buster-root-legacy-odroidn2 20.08 linux-dtb-legacy-meson64 20.08 linux-image-legacy-meson64 20.08 linux-u-boot-odroidn2-legacy 20.08

 

Here the error message:

 

/var/lib/openmediavault/cron.d/userdefined-ee6e5e4d-afef-449f-88fb-b6b4d0e4f1a5: 20: /etc/profile.d/armbian-check-first-login.sh: Syntax error: "(" unexpected

 

So there seems to be a syntax problem in the new version of the "armbian-check-first-login.sh" script. I am not sure why it is used on starting the user defined cron jobs from omv5, but for now there are not working anymore.

 

Maybe some one has the same issue?

Link to comment
Share on other sites

Help Armbian team helping you!

45 minutes ago, Werner said:

Try find / -name armbian-check-first-login.sh

$ find / -name armbian-check-first-login.sh
......
/etc/profile.d/armbian-check-first-login.sh
.....

.....

sudo cp /etc/profile.d/armbian-check-first-login.sh /etc/profile.d/armbian-check-first-login.sh.bak

sudo rm /etc/profile.d/armbian-check-first-login.sh

reboot

Worked!

 

What are the possible problems or security concerns when the armbian-check-first-login.sh file is deleted?
Many thanks.

Link to comment
Share on other sites

18 minutes ago, Neo2018 said:

What are the possible problems or security concerns when the armbian-check-first-login.sh file is deleted?
Many thanks.

Quoting @ryecoaaron

Quote

I would think it would be safe to delete /etc/profile.d/armbian-check-first-login.sh and that should fix your issue. Line 20 references /usr/bin/psd (provided by the profile-sync-daemon package) that isn't on my systems.

 

Link to comment
Share on other sites

57 minutes ago, Neo2018 said:

What are the possible problems or security concerns when the armbian-check-first-login.sh file is deleted?

 

Like the script indicates - its only useful for 1st login, so you can delete it.

 

If you install Armbian and then install OMV you should not have this problem.

 

Condition for running:
https://github.com/armbian/build/blob/master/packages/bsp/common/etc/profile.d/armbian-check-first-login.sh#L186

... probably 1st run was interrupted. As you can see its safer  / better to remove /root/.not_logged_in_yet

Link to comment
Share on other sites

On 9/2/2020 at 9:38 AM, Igor said:

rm -f /root/.not_logged_in_yet

unfortunately that doesn't work for me. maybe I'm doing something wrong?
I restored the armbian-check-first-login.sh, then executed the command rm -f /root/.not_logged_in_yet and restarted the system. cron does NOT work! :(

Link to comment
Share on other sites

5 minutes ago, Neo2018 said:

I restored the armbian-check-first-login.sh, then executed the command rm -f /root/.not_logged_in_yet and restarted the system. cron does NOT work!


Strange. OMV changes system dramatically and since I don't exactly know what ... its hard to tell what else to look for. You can also remove this script since its not needed anymore ... but it could show up with some update. 

Link to comment
Share on other sites

1 minute ago, jshc1 said:

not_logged_in_yet does not occur with omv, at least I never saw it after logging in.


Yeah, but obviously something is messed up. I am trying to understand if this is our problem or OMV. Not sure atm.

 

On 8/27/2020 at 7:20 AM, Franky66 said:

/var/lib/openmediavault/cron.d/userdefined-ee6e5e4d-afef-449f-88fb-b6b4d0e4f1a5: 20: /etc/profile.d/armbian-check-first-login.sh: Syntax error: "(" unexpected

 

Link to comment
Share on other sites

Funny I came across a similar error today on a RP64 with a build of Focal desktop 20.08-dev that I compiled a few days ago. I updated via APT this morning.

uname -a
Linux xxxx 5.8.5-rockchip64 #trunk SMP PREEMPT Tue Sep 1 14:46:03 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux

 

Here are my symptoms:

 

$ sudo useradd -m testee
$ sudo passwd testee
New password:
Retype new password:
passwd: password updated successfully
$ su - testee
Password:
-sh: 20: /etc/profile.d/armbian-check-first-login.sh: Syntax error: "(" unexpected

My own user account (created when the system first booted and initialized) is fine. It's only on new accounts the issue exists. i am not sure when this issue manifested itself. It was only today that I tried to create a new user.

 

I offer this as some additional data - if it's not relevant to your issue then I apologize :)

 

- E

Link to comment
Share on other sites

I have the same problem and opened the script (/etc/profile.d/armbian-check-first-login.sh)

The function "read_password" at line 20 is the only one that is prefixed with "function", could that be the problem? I guess it is possible that the interpreter changed with an update and doesn't like this keyword?

Link to comment
Share on other sites

I saw on github that the problem should be fixed but I didn't see any update in the last 14 days which installed new version of the necessary files. Will there be an update available which fixes this or do I have to manually change files and if yes what files where to change?

Link to comment
Share on other sites

55 minutes ago, Franky66 said:

I saw on github that the problem should be fixed but I didn't see any update in the last 14 days which installed new version of the necessary files. Will there be an update available which fixes this or do I have to manually change files and if yes what files where to change?

I made an update 2 minutes ago, it seems to have been fixed.
with the last update it was fixed!

Link to comment
Share on other sites

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...
 Share

×
×
  • Create New...