On Sat, 7 Mar 2015, Isaac Dunham wrote:
Hi, could you resubmit in gt format-patch format? Thanks. -jon > * insserv requires a shebang line > * the rc script can hang if a daemon is started in the foreground > * "pgrep dtlogin" apparently can match the init script, if it is started > with "service dtlogin start" or similar. > * reduce code duplication > --- > cde/contrib/rc/linux/dtlogin | 51 ++++++++++++++++++++++---------------------- > 1 file changed, 25 insertions(+), 26 deletions(-) > > diff --git a/cde/contrib/rc/linux/dtlogin b/cde/contrib/rc/linux/dtlogin > index 3a04ab5..177ae34 100644 > --- a/cde/contrib/rc/linux/dtlogin > +++ b/cde/contrib/rc/linux/dtlogin > @@ -1,3 +1,4 @@ > +#!/bin/sh > ### BEGIN INIT INFO > # Provides: lsb-dtlogin > # Required-Start: $all > @@ -8,38 +9,36 @@ > # Description: Dtlogin > ### END INIT INFO > > +export PATH="/usr/dt/bin:$PATH" > +OPTIONS="-quiet -daemon" > + > +start(){ > + if [ -z "$(pgrep /usr/dt/bin/dtlogin)" ]; > + then > + echo " * Starting dtlogin..." > + export LANG=C > + /usr/dt/bin/dtlogin $OPTIONS > + fi > +} > + > +stop(){ > + if [ -n "$(pgrep /usr/dt/bin/dtlogin)" ]; > + then > + echo " * Stopping dtlogin..." > + killall /usr/dt/bin/dtlogin > + fi > +} > + > case "$1" in > 'start') > - if [ -z "$(pgrep dtlogin)" ]; > - then > - echo " * Starting dtlogin..." > - export LANG=C > - exec /usr/dt/bin/dtlogin > - else > - echo "DTlogin already running..." > - exit 0 > - fi > + start > ;; > 'stop') > - if [ -z "$(pgrep dtlogin)" ]; > - then > - exit 0 > - else > - echo " * Stopping dtlogin..." > - killall /usr/dt/bin/dtlogin > - fi > + stop > ;; > 'restart') > - if [ -z "$(pgrep dtlogin)" ]; > - then > - export LANG=C > - exec /usr/dt/bin/dtlogin > - else > - echo " * Restarting dtlogin..." > - killall /usr/dt/bin/dtlogin > - export LANG=C > - exec /usr/dt/bin/dtlogin > - fi > + stop > + start > ;; > 'status') > if [ -z "$(pgrep dtlogin)" ]; > -- Jon Trulson "Don't believe everything you read on the internet." --Abraham Lincoln ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel