Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #168758
| From | Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble |
| Date | 2016-06-09 22:40 +0200 |
| Message-ID | <rIeUa-2WE-13@gated-at.bofh.it> (permalink) |
| References | <rIcfD-18x-3@gated-at.bofh.it> <rIdEK-2bK-13@gated-at.bofh.it> <rIdOp-2fC-9@gated-at.bofh.it> <rIeKu-2SW-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On 10/06/2016 6:17 AM, Dan Purgert wrote: >> Perhaps, but why? I'm not asking it to log anything to syslog; just to >> create it's own log file in the /var/log directory. > > Just going off the comments at the top -- states "required-start: > $syslog". Although, I suppose that you could've just forgotten to > remove that bit. I'm sure it can be removed, I started off with the /etc/init.d/skeleton and tried to work from there when the script didn't run at startup without the extras at the top. >> [snip] >> Weird artifcat of something (perhaps GPG due to signing?), my copy as >> sent to the list is clean. The script works perfectly if ran with an >> interactive shell; right now the script isn't destructive, so I can run >> it as many times as I like and it works fine. The plan is to adjust the >> script, I think you can see how, but not until it works as expected. > > How are you calling it while logged in? I'm starting to wonder if it's > a difference between [da]sh and bash (or whatever your standard login > shell is). # echo $SHELL /bin/bash # /etc/init.d/archive-system-mail start + NAME=archive-system-mail + SCRIPTNAME=/etc/init.d/archive-system-mail + trap do_cleanup 99 HUP INT TERM + ARCHIVE_DIR= + /bin/date +%Y%m%d + DATEX=20160610 + /usr/bin/basename /etc/init.d/archive-system-mail + PROGNAME=archive-system-mail + do_main + date +%Y%m%d%H%M%S + /usr/bin/tee /var/log/archive-system-mail--20160610062530.log + get_archivedir + ARCHIVE_DIR=/backup/mail/system_filter_all_mail/archive/20160610a + [ ! -d /backup/mail/system_filter_all_mail/archive/20160610a ] + VER=a + return 0 + [ ! -d /backup/mail/system_filter_all_mail/archive/20160610a ] + /bin/mkdir /backup/mail/system_filter_all_mail/archive/20160610a + /usr/bin/touch /backup/mail/system_filter_all_mail/archive/20160610a/log--lots.23380 + /bin/mkdir /backup/mail/system_filter_all_mail/archive/20160610a/Maildir.23380 + : > Also, not entirely sure what the 'VER=$x" assignment is doing, as you > don't seem to read $VER anywhere else. Yes, it is useless there; copy and pasted the version part from another script. I noticed that when I read over my message to the list, but whilst that is true, it shouldn't make any difference to the script being able to run or not at start up. The script does have #! /bin/sh at the top and /bin/sh does point to /bin/dash as follows: # ls -l /bin/sh lrwxrwxrwx 1 root root 4 Feb 21 17:40 /bin/sh -> dash Thanks AndrewM
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-09 19:50 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Dan Purgert <dan@djph.net> - 2016-06-09 21:20 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-09 21:30 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Dan Purgert <dan@djph.net> - 2016-06-09 22:30 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-09 22:40 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Dan Purgert <dan@djph.net> - 2016-06-09 23:10 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Nicholas Geovanis <nickgeovanis@gmail.com> - 2016-06-09 23:30 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Mark Neyhart <Mark.Neyhart@akleg.gov> - 2016-06-09 23:30 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Brian <ad44@cityscape.co.uk> - 2016-06-09 21:30 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-09 21:40 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Brian <ad44@cityscape.co.uk> - 2016-06-09 22:10 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-09 22:20 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Christian Seiler <christian@iwakd.de> - 2016-06-10 00:40 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Mart van de Wege <mvdwege@gmail.com> - 2016-06-10 10:20 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Christian Seiler <christian@iwakd.de> - 2016-06-09 23:40 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-10 08:00 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Christian Seiler <christian@iwakd.de> - 2016-06-10 09:20 +0200
Re: Linux startup, Wheezy -- a required script won't run on startup, but can run manually without any trouble Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-06-11 06:10 +0200
csiph-web