Problems with crontab and solution included ::)

Stefan Berder sbe at oleane.net
Mon Apr 18 10:22:30 CEST 2005


Hi all,

I'm using FAI for a while now and just realised there we a problem with
crontab and the way FAI handles the /tmp dir.

If you use the /usr/share/doc/fai/examples/simple/ configuration
environment, there is a problem, I think, in scripts/LAST.
There is the following lines :
# if no separate /tmp partition exists, make link /tmp -> /var/tmp
ifclass TMP_PARTITION || {
    rm -rf $target/tmp
    ln -s  /var/tmp $target/tmp
}

The problem I see there is that crontab does not really like /tmp being
a symlink. The result is when as a user you try to do a crontab -e to
edit your crontab, it won't work at all :
user at xxx:~$ crontab -e
crontab: no changes made to crontab

The way to solve this is following :
root at xxx:~# rm /tmp
root at xxx:~# mkdir -m 777 /tmp
root at xxx:~# chmod o+t /tmp/

I commented out the lines concerning this TMP_PARTITION class and really
think it shouldn't be there in the 'simple' examples.

Understand me well, cron is not broken, it's just crontab -e that is
broken by the symlink. you always could build your own crontab by using
a file and 'crontab file'.

Stefan

ps: root at fai:~/# dpkg -l | grep fai
ii  fai            2.5.4          Fully Automatic Installation
ii  fai-kernels    1.6            special kernels for FAI (Fully
Automatic Ins
-- 
 #=- Stefan Berder                  tel : 6 14 80        -=#
 #=- Ingénieur système et réseau          01 53 95 14 80 -=#
 #=- TRANSPAC / DO-DAE-ADMP-iSO    mail : sbe at oleane.net -=#
 #=- /(bb|[^b]{2})/      stefan.berder at francetelecom.com -=#



More information about the linux-fai mailing list