[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#533046: live-initramfs: cron services in live system



Package: live-initramfs
Followup-For: Bug #533046



-- Package-specific info:

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=pt_PT.UTF-8, LC_CTYPE=pt_PT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages live-initramfs depends on:
ii  busybox                   1:1.10.2-2     Tiny utilities for small and embed
ii  file                      4.26-1         Determines file type using "magic"
ii  initramfs-tools           0.92o          tools for generating an initramfs
ii  sudo                      1.6.9p17-2     Provide limited super user privile
ii  udev                      0.125-7+lenny1 /dev/ and hotplug management daemo
ii  user-setup                1.23           Set up initial user and password

Versions of packages live-initramfs recommends:
ii  cryptsetup                  2:1.0.6-7    configures encrypted block devices
ii  eject                       2.1.5+deb1-4 ejects CDs and operates CD-Changer
ii  uuid-runtime                1.41.3-1     universally unique id library
ii  wget                        1.11.4-2     retrieves files from the web

Versions of packages live-initramfs suggests:
pn  curlftpfs                     <none>     (no description available)
pn  genext2fs                     <none>     (no description available)
pn  httpfs2                       <none>     (no description available)
ii  loop-aes-utils                2.13.1-4   Tools for mounting and manipulatin
pn  mtd-tools                     <none>     (no description available)
ii  squashfs-tools                1:3.3-7    Tool to create and append to squas

-- no debconf information


Correction: the whole if block wasn't being executed also, so the 
dpkg-divert command and the wrong link weren't executed too. More, the 
correct link should be from /bin/true to /root/usr/sbin/anacron (I 
guess /bin gets mounted before /root).

Here is a diff from the changes I made (with a corrected link):


--- /usr/share/initramfs-tools/scripts/live-bottom/25configure_init	2009-06-14 06:45:13.000000000 +0000
+++ modified/25configure_init	2009-06-14 22:21:41.444530789 +0000
@@ -87,14 +87,14 @@ then
 fi
 
 # do not try to remove files if using file-rc
-if [ -d /etc/rc0.d ]
+if [ -d /root/etc/rc0.d ]
 then
 	# This has the nice side effect of the cron.{daily,weekly,monthly} jobs in
 	# /etc/crontab remaining disabled, yet also not run by anacron
 	if [ -x /root/usr/sbin/anacron ]
 	then
 		chroot /root dpkg-divert --add --rename --quiet /usr/sbin/anacron
-		ln -s /bin/true /usr/sbin/anacron
+		ln -s /bin/true /root/usr/sbin/anacron
 	fi
 
 	# No point, really

Tested and confirmed working.
anacron is linked and «dpkg-diverted» now:
$ ls -l /usb/sbin/anacron*
lrwxrwxrwx 1 root root    14 Jun 14 22:16 /usr/sbin/anacron -> /bin/true
-rwxr-xr-x 1 root root 23040 Mar  9  2008 /usr/sbin/anacron.distrib
$ sudo dpkg-divert --list|grep anacron
local diversion of /usr/sbin/anacron to /usr/sbin/anacron.distrib

No more anacron process:
$ ps aux |grep anacron
live      6458  0.0  0.1   3128   736 pts/0    R+   22:33   0:00 grep anacron

Now that the if block is working, it's preventing my postfix server from 
starting:

	# No point, really
	rm -f /root/etc/rc?.d/[SK]??postfix

Postfix isn't installed by default in debian, so I guess the point was 
to do this with exim4. Since there is really no point for doing that for 
neither of them (postfix nor exim4) I would suggest removing that line. 



Reply to: