Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bug - cron openmediavault not working after updates to armbian

Featured Replies

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?

  • Author

For now I have downgraded the script temporary to the old version and cron jobs are working again.

I think the update messed up something. Many things that had "bin/sh" like xrdp have a problem now. Changing to bin/bash helps in some cases...

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

Maybe some one has the same issue?

I have the same problems :(

Is there a solution for cronjobs?
Thank you!

28 minutes ago, Neo2018 said:

I have the same problems :(

Is there a solution for cronjobs?
Thank you!

It's hard to say, at the moment it works for me. Try deleting this script "armbian-check-first-login.sh" and reboot, check cron ...

3 hours ago, jshc1 said:

It's hard to say, at the moment it works for me. Try deleting this script "armbian-check-first-login.sh" and reboot, check cron ...

where is the script located? what is the exact path to the script? /etc/.... ???
Thank 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.

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.

 

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

13 hours ago, Igor said:

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

Should the complete line 186 be deleted or replaced by something specific? How should the script look like?

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! :(

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. 

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

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

 

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

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?

  • Author

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?

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!

  • Author

Yes that is right, with the update package "linux-buster-root-legacy-xxx 20.08.3 on my odroid n2 it is fixed and new versions of the files are installed. After rebooting with installing the other updates everything is fine now.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.