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

Re: Running a script from /etc/ip-up.d


Christian Dysthe:
> #! /bin/sh
> fetchmail -f /home/cdysthe/.fetchmailrc
> I also made a more "complete" script using:
> #1 /bin/sh

That should be #! and there shouldn't be a space after it.

> if [ -x /usr/bin/fetchmail ]
>    then /usr/bin/fetchmail -f /home/cdysthe/.fetchmailrc
> fi
> exit 0

Actually, there's not much point doing this. The reason everything else has
it is because when you uninstall a package (rather than purge), dpkg will
leave the ip-up.d script behind and it needs to handle that. I can't quote
chapter and verse, but it's in the policy.

> Another strange thing is that it works and collects mail if I add the
> line: "fetchmail -f /home/cdysthe/.fetchmailrc" to the xisp script in
> /etc/ip-up.d

What's the name of your script? You're only allowed to use letters,
numbers, dashes and underscores in filenames in the ip-up.d directory (same
goes for cron.daily and so on).

If it works when you add the same line to another ip-up.d script, then the
command itself is OK and I'd suspect something about the script or the way
it's invoked... like its name, owner, permissions, bad #! line or similar.

We'll know the future has arrived when every mailer transparently
quotes lines that begin with "From ", but no-one remembers why.

Reply to: