Project

General

Profile

Bug #736

root crontab does not survive reboot

Added by n2deep n2deep over 8 years ago. Updated about 8 years ago.

Status:
Feedback
Priority:
High
Assignee:
Category:
OS/Net (Kernel and Userland)
Target version:
Start date:
2011-02-17
Due date:
2011-09-14
% Done:

0%

Estimated time:
8.00 h
Difficulty:
Medium
Tags:
SMF

Description

Making changes to a B148 root crontab is pointless if you reboot the machine. Your changes will be overwritten at the next reboot. After every reboot, the root crontab will look like it did after the initial B148 installation. I have confirmed this on two separate B148 desktop installs.

User crontabs seem to survive reboots.

History

#1

Updated by matthew lagoe over 8 years ago

svc:/application/pkg/update:default seems to cause the issue

#2

Updated by Julian Wiesener about 8 years ago

  • Difficulty set to Medium
  • Tags set to needs-triage

please test by svcadm disable pkg/update.
It doesn't hurt, since it only will stop automatic refreshs, pkg refresh, pkg image-update will still work.

There are a few SMF services that edit or remove crontabs, time-slider, time-slider-rsync, pkg-update and svc-sar.

timeslider: remove_legacy_cronjobs
timeslider-rsync adds removes with grep -v "${RSYNC_PROG} $SMF_FMRI$"
sar: rm crontab/sys on stop

pkg-update
REFRESH_PROG="/usr/lib/update-manager/update-refresh.sh"

crontab -l | grep -v "${REFRESH_PROG}" \
> /tmp/saved-crontab.$$
crontab /tmp/saved-crontab.$$
check_failure $? "Unable to unschedule snapshots for $FMRI"

This will cause a replacement of the crontab with the output of crontab -REFRESH_PROG, i don't see how it could affect other entires.

(and yes, all 4 smf methots are a mess)

#3

Updated by Julian Wiesener about 8 years ago

  • Status changed from New to Feedback
  • Assignee set to Julian Wiesener
  • Tags changed from needs-triage to SMF
#4

Updated by Julian Wiesener about 8 years ago

  • Assignee deleted (Julian Wiesener)

i'm not going to working on that issue atm

#5

Updated by Ken Mays about 8 years ago

  • Due date set to 2011-09-14
  • Category set to OS/Net (Kernel and Userland)
  • Assignee set to OI illumos
  • Target version set to oi_151_stable
  • Estimated time set to 8.00 h

Also available in: Atom PDF