LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-24-2007, 06:06 AM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 50
Anacron job 'cron.daily'


hi

I have etch stable and I'm getting the following root mails:
Code:
/etc/cron.daily/man-db:
mandb: warning: /usr/share/man/man1/ControlPanel.1.gz is a dangling symlink

Code:
# ls -la /usr/share/man/man1/ControlPanel.1.gz
ls: /usr/share/man/man1/ControlPanel.1.gz: No such file or directory
Code:
# cat /etc/cron.daily/man-db
#!/bin/sh
#
# man-db cron daily

set -e

if ! [ -d /var/cache/man ]; then
    # Recover from deletion, per FHS.
    mkdir -p /var/cache/man
    chown man:root /var/cache/man
    chmod 2755 /var/cache/man
fi

# expunge old catman pages which have not been read in a week
if [ -d /var/cache/man ]; then
  cd /
  if ! dpkg-statoverride --list /var/cache/man >/dev/null 2>&1; then
    chown -R man /var/cache/man || true         # just in case
  fi
  start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \
        --oknodo --chuid man -- -c \
        "find /var/cache/man -type f -name '*.gz' -atime +6 -print0 | \
         xargs -r0 rm -f"
fi

# regenerate man database
if [ -x /usr/bin/mandb ]; then
    # --pidfile /dev/null so it always starts; mandb isn't really a daemon,
    # but we want to start it like one.
    start-stop-daemon --start --pidfile /dev/null \
                      --startas /usr/bin/mandb --oknodo --chuid man \
                      -- --no-purge --quiet
fi

exit 0
howto solve this problem ?

Last edited by cccc; 08-27-2007 at 07:04 AM.
 
Old 08-24-2007, 08:19 AM   #2
Axo
Member
 
Registered: May 2003
Distribution: Debian
Posts: 153

Rep: Reputation: 17
If that is the only entry that cron is whining about check what it's linking to and if it doesn't exist delete it.
 
Old 08-24-2007, 08:42 AM   #3
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
a dangling symlink means it's not linked to anything, you can safely remove it.
 
Old 08-27-2007, 07:04 AM   #4
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by yanik View Post
a dangling symlink means it's not linked to anything, you can safely remove it.
thx, but where can I delete it ?
 
Old 08-27-2007, 08:09 AM   #5
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
An easy way to deal with symlinks is to install 'symlinks' from the repos.

From the symlinks man page:
Code:
It scans directories for symbolic links and lists them on stdout, often revealing flaws in the filesystem tree.
and

Code:
-d     causes dangling links to be removed.
 
Old 08-27-2007, 08:15 AM   #6
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
you mean, now it's OK ?
Code:
# symlinks -d
symlinks: scan/change symbolic links - v1.2 - by Mark Lord

Usage:  symlinks [-crsv] dirlist

Flags:  -c == change absolute/messy links to relative
        -d == delete dangling links
        -r == recurse into subdirs
        -s == shorten lengthy links
        -v == verbose (show all symlinks)
 
Old 08-27-2007, 08:37 AM   #7
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
no, you have to tell it where to look for symlinks.

As root;

Code:
symlinks -d /
 
Old 08-27-2007, 09:34 AM   #8
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
I've done:
Code:
symlinks -d /
other_fs: /initrd.img -> boot/initrd.img-2.6.18-5-686
other_fs: /vmlinuz -> boot/vmlinuz-2.6.18-5-686
other_fs: /initrd.img.old -> boot/initrd.img-2.6.18-4-686
other_fs: /vmlinuz.old -> boot/vmlinuz-2.6.18-4-686
you think, now shoud be OK ?
 
Old 08-27-2007, 09:39 AM   #9
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
try your scrpit again :

Code:
/etc/cron.daily/man-db
And see if the error is gone.
 
Old 08-27-2007, 09:42 AM   #10
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
I get no errors:
Code:
# /etc/cron.daily/man-db
#
 
Old 08-28-2007, 05:35 AM   #11
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
thx a lot !

Last edited by cccc; 08-31-2007 at 04:57 AM.
 
Old 08-31-2007, 05:01 AM   #12
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
sorry, but this problem still exists.

if I'm doing:
Code:
# /etc/cron.daily/man-db
#
I don't get any errors, but still get these mails:
Code:
/etc/cron.daily/man-db:
mandb: warning: /usr/share/man/man1/ControlPanel.1.gz is a dangling symlink
any other ida, what's wrong ?

Last edited by cccc; 08-31-2007 at 05:02 AM.
 
Old 08-31-2007, 08:05 AM   #13
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
I don't know then. I would try to re-create the db as root with:

Code:
mandb -c
 
Old 09-05-2007, 06:37 AM   #14
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
thx, it seems to work now.
 
Old 05-20-2008, 01:32 PM   #15
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
what happens after this command:
Code:
# symlinks -r -d /
on debian ?

Last edited by cccc; 05-20-2008 at 01:39 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 02:50 PM
Cron Job Daily petenyce Linux - Newbie 17 01-04-2006 12:13 PM
updatedb daily cron job TranceDude Linux - Software 12 08-25-2005 01:09 PM
Semi-Daily Cron Job Apollo77 Linux - General 8 01-13-2004 03:17 PM
save daily from cron job the whole Web servers data cccc Linux - General 2 09-09-2003 02:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration