no good way to implement post upgrade scripts at least not in fedora. I'll post a thing on the fedoraforum and ask the developers but I can't get its /etc/yum/post-action/my_action working after reading the docs and all. Complicated as hell I hate having to create crontabs to make sure things are correct. On Mon, Oct 23, 2017 at 4:20 PM, Jeff Sadowski <jeff.sadowski@xxxxxxxxx> wrote: > On Mon, Oct 23, 2017 at 9:04 AM, Jeff Sadowski <jeff.sadowski@xxxxxxxxx> wrote: >> So my best bet is going to be to put >> >> alias wall=/script/wall.sh >> >> in my /etc/bash.bashrc >> and any other allowed shell rc's >> where my /script/wall.sh does the things I want. >> and change any scripts like my /etc/apcupsd/apccontrol >> and change its WALL=wall to WALL=/script/wall.sh >> as well. >> >> I'll just have to go searching through /etc/ for files containing wall >> >> This will get most things I care about but it might skip messages that >> some users may broadcast >> should adding the "#!/bin/bash" as the first line to shell scripts >> cause the script to use the alias? >> > This doesn't work so I'm stuck with having to find all scripts and > manually change them > and having to warn users about wall not having this capability > > My current wall script looks like so > > #!/bin/bash > # filename: /home/scripts/wall.sh > # purpose: to email myself wall messages and to log them > input="$@" > if [ "${input}" = "" ];then > input=$(cat) > fi > logger -s "from ${BASH_SOURCE[0]} : $@" >/dev/null 2>&1 > echo -e "${input}" | mutt -s "wall messages from $(hostname) at > $(date)" jeff.sadowski@xxxxxxxxx > echo -e "${input}" | /bin/wall > > > I'll work on getting it to other users's desktops as well but this all > seems like stuff that should be implemented in wall. > Another alternative is to wrap it and have a post upgrade script look > to see if wall is a symlink pointing to my script and if not move it > to /bin/real.wall and use /bin/real.wall in my scripts. I'm thinking > that would be the best. > Now to find the post upgrade scripts for centos, fedora and ubuntu. > >> >> On Mon, Oct 23, 2017 at 4:53 AM, Karel Zak <kzak@xxxxxxxxxx> wrote: >>> On Wed, Oct 18, 2017 at 02:06:25PM -0600, Jeff Sadowski wrote: >>>> I would like to know if this feature is built into wall or is there a >>>> good work around? >>> >>> wall is usually used by superuser. I guess if you can all "wall" than >>> you can also call for example logger to write to the system logs. I >>> don't see reason to merge functionally of these tools together. >>> >>>> I would like to configure wall to run a script after anything is posted to wall. >>> >>> Why? Maybe there is better way go get your goal. >>> >>>> I would also like to log all wall messages. I could easily do that >>>> with a script. >>> >>> yes, script(1) is the right way >>> >>> Karel >>> >>> >>> -- >>> Karel Zak <kzak@xxxxxxxxxx> >>> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html