diff options
Diffstat (limited to '')
-rw-r--r-- | japanese/Canna/files/canna.sh.in | 29 | ||||
-rw-r--r-- | japanese/FreeWnn-server/pkg-install | 44 | ||||
-rw-r--r-- | japanese/Wnn6/pkg-install | 18 | ||||
-rw-r--r-- | japanese/canna-lib/files/canna.sh.in | 29 | ||||
-rw-r--r-- | japanese/canna-server/files/canna.sh.in | 29 | ||||
-rw-r--r-- | japanese/ebw3/files/ebw3d.sh.sample | 22 | ||||
-rw-r--r-- | japanese/elvis/Makefile | 17 | ||||
-rw-r--r-- | japanese/elvis/files/ja-elvis.sh | 25 | ||||
-rw-r--r-- | japanese/esecanna/files/esecanna.sh | 52 | ||||
-rw-r--r-- | japanese/postgresql-tcltk/files/pgsql.sh.tmpl | 26 | ||||
-rw-r--r-- | japanese/postgresql/files/pgsql.sh.tmpl | 26 | ||||
-rw-r--r-- | japanese/postgresql7/files/pgsql.sh.tmpl | 26 | ||||
-rw-r--r-- | japanese/sj3-lib/Makefile | 8 | ||||
-rw-r--r-- | japanese/sj3-lib/files/sj3.sh.in | 22 | ||||
-rw-r--r-- | japanese/sj3-server/Makefile | 8 | ||||
-rw-r--r-- | japanese/sj3-server/files/sj3.sh.in | 22 | ||||
-rw-r--r-- | japanese/sj3/Makefile | 8 | ||||
-rw-r--r-- | japanese/sj3/files/sj3.sh.in | 22 |
18 files changed, 314 insertions, 119 deletions
diff --git a/japanese/Canna/files/canna.sh.in b/japanese/Canna/files/canna.sh.in index beab506bd53a..63eb74665316 100644 --- a/japanese/Canna/files/canna.sh.in +++ b/japanese/Canna/files/canna.sh.in @@ -1,10 +1,23 @@ #!/bin/sh canna=@PREFIX@/sbin/cannaserver -if [ -f $canna ]; then - rm -f /var/run/canna/Canna.pid - mkdir -p /var/run/canna - touch /var/log/CANNA0msgs - chown bin:bin /var/run/canna /var/log/CANNA0msgs - echo -n ' Canna' - $canna -fi + +case "$1" in +start) + if [ -f $canna ]; then + rm -f /var/run/canna/Canna.pid + mkdir -p /var/run/canna + touch /var/log/CANNA0msgs + chown bin:bin /var/run/canna /var/log/CANNA0msgs + echo -n ' Canna' + $canna + fi +stop) + killall $canna && echo -n ' Canna' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/FreeWnn-server/pkg-install b/japanese/FreeWnn-server/pkg-install index 9581b53e9ee5..612660afd0e0 100644 --- a/japanese/FreeWnn-server/pkg-install +++ b/japanese/FreeWnn-server/pkg-install @@ -145,29 +145,41 @@ POST-INSTALL) if [ ! -f ${startup_script} ]; then echo "Installing ${startup_script} startup file."; echo '#!/bin/sh' > ${startup_script}; - echo "wnn=${wnnserver}" >> ${startup_script}; - echo 'if [ -x $wnn ]; then' >> ${startup_script}; - echo " ${wnnstat} -L ${wnn_lang} localhost > /dev/null 2>&1" >> ${startup_script}; - echo ' if [ $? = 255 ]; then' >> ${startup_script}; - echo " rm -f ${wnn_socket}" >> ${startup_script}; - echo " echo -n ' ${wnnname}'" >> ${startup_script}; - echo ' $wnn' >> ${startup_script}; + echo 'case $1 in' >> ${startup_script}; + echo 'start)' >> ${startup_script}; + echo " wnn=${wnnserver}" >> ${startup_script}; + echo ' if [ -x $wnn ]; then' >> ${startup_script}; + echo " ${wnnstat} -L ${wnn_lang} localhost > /dev/null 2>&1" >> ${startup_script}; + echo ' if [ $? = 255 ]; then' >> ${startup_script}; + echo " rm -f ${wnn_socket}" >> ${startup_script}; + echo " echo -n ' ${wnnname}'" >> ${startup_script}; + echo ' $wnn' >> ${startup_script}; + echo " fi" >> ${startup_script}; echo " fi" >> ${startup_script}; - echo "fi" >> ${startup_script}; if [ $1 = zh-Wnn-4.2 ]; then wnnserver=${PKG_PREFIX}/bin/cWnn4/tserver wnn_lang=zh_TW wnn_socket=/tmp/td_sockV4 - echo "wnn=${wnnserver}" >> ${startup_script}; - echo 'if [ -x $wnn ]; then' >> ${startup_script}; - echo " ${wnnstat} -L ${wnn_lang} localhost > /dev/null 2>&1" >> ${startup_script}; - echo ' if [ $? = 255 ]; then' >> ${startup_script}; - echo " rm -f ${wnn_socket}" >> ${startup_script}; - echo " echo -n ' ${wnnname}'" >> ${startup_script}; - echo ' $wnn' >> ${startup_script}; + echo " wnn=${wnnserver}" >> ${startup_script}; + echo ' if [ -x $wnn ]; then' >> ${startup_script}; + echo " ${wnnstat} -L ${wnn_lang} localhost > /dev/null 2>&1" >> ${startup_script}; + echo ' if [ $? = 255 ]; then' >> ${startup_script}; + echo " rm -f ${wnn_socket}" >> ${startup_script}; + echo " echo -n ' ${wnnname}'" >> ${startup_script}; + echo ' $wnn' >> ${startup_script}; + echo " fi" >> ${startup_script}; echo " fi" >> ${startup_script}; - echo "fi" >> ${startup_script}; fi + echo ' ;;' >> ${startup_script}; + echo 'stop)' >> ${startup_script}; + echo ' killall $wnn' >> ${startup_script}; + echo " echo -n ' ${wnnname}'" >> ${startup_script}; + echo ' ;;' >> ${startup_script}; + echo '*)' >> ${startup_script}; + echo ' echo "Usage: `basename $0` {start|stop}" >&2' >> ${startup_script}; + echo ' ;;' >> ${startup_script}; + echo 'esac' >> ${startup_script}; + echo 'exit 0' >> ${startup_script}; chmod 755 ${startup_script}; chown bin.bin ${startup_script}; fi diff --git a/japanese/Wnn6/pkg-install b/japanese/Wnn6/pkg-install index e50af7b35e68..915b13031851 100644 --- a/japanese/Wnn6/pkg-install +++ b/japanese/Wnn6/pkg-install @@ -173,10 +173,22 @@ POST-INSTALL) echo "Installing ${startup_script} startup file." echo '#!/bin/sh' > ${startup_script}; echo "wnn=${wnnserver}" >> ${startup_script}; - echo 'if [ -f $wnn ]; then' >> ${startup_script}; + echo 'case $1 in' >> ${startup_script}; + echo 'start)' >> ${startup_script}; + echo ' if [ -f $wnn ]; then' >> ${startup_script}; + echo " echo -n ' ${wnnname}'" >> ${startup_script}; + echo ' $wnn' >> ${startup_script}; + echo " fi" >> ${startup_script}; + echo ' ;;' >> ${startup_script}; + echo 'stop)' >> ${startup_script}; + echo ' killall $wnn' >> ${startup_script}; echo " echo -n ' ${wnnname}'" >> ${startup_script}; - echo ' $wnn' >> ${startup_script}; - echo "fi" >> ${startup_script}; + echo ' ;;' >> ${startup_script}; + echo '*)' >> ${startup_script}; + echo ' echo "Usage: `basename $0` {start|stop}" >&2' >> ${startup_script}; + echo ' ;;' >> ${startup_script}; + echo 'esac' >> ${startup_script}; + echo 'exit 0' >> ${startup_script}; chmod 755 ${startup_script} chown bin.bin ${startup_script} fi diff --git a/japanese/canna-lib/files/canna.sh.in b/japanese/canna-lib/files/canna.sh.in index beab506bd53a..63eb74665316 100644 --- a/japanese/canna-lib/files/canna.sh.in +++ b/japanese/canna-lib/files/canna.sh.in @@ -1,10 +1,23 @@ #!/bin/sh canna=@PREFIX@/sbin/cannaserver -if [ -f $canna ]; then - rm -f /var/run/canna/Canna.pid - mkdir -p /var/run/canna - touch /var/log/CANNA0msgs - chown bin:bin /var/run/canna /var/log/CANNA0msgs - echo -n ' Canna' - $canna -fi + +case "$1" in +start) + if [ -f $canna ]; then + rm -f /var/run/canna/Canna.pid + mkdir -p /var/run/canna + touch /var/log/CANNA0msgs + chown bin:bin /var/run/canna /var/log/CANNA0msgs + echo -n ' Canna' + $canna + fi +stop) + killall $canna && echo -n ' Canna' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/canna-server/files/canna.sh.in b/japanese/canna-server/files/canna.sh.in index beab506bd53a..63eb74665316 100644 --- a/japanese/canna-server/files/canna.sh.in +++ b/japanese/canna-server/files/canna.sh.in @@ -1,10 +1,23 @@ #!/bin/sh canna=@PREFIX@/sbin/cannaserver -if [ -f $canna ]; then - rm -f /var/run/canna/Canna.pid - mkdir -p /var/run/canna - touch /var/log/CANNA0msgs - chown bin:bin /var/run/canna /var/log/CANNA0msgs - echo -n ' Canna' - $canna -fi + +case "$1" in +start) + if [ -f $canna ]; then + rm -f /var/run/canna/Canna.pid + mkdir -p /var/run/canna + touch /var/log/CANNA0msgs + chown bin:bin /var/run/canna /var/log/CANNA0msgs + echo -n ' Canna' + $canna + fi +stop) + killall $canna && echo -n ' Canna' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/ebw3/files/ebw3d.sh.sample b/japanese/ebw3/files/ebw3d.sh.sample index 710f6c6e9e15..d7168858ca91 100644 --- a/japanese/ebw3/files/ebw3d.sh.sample +++ b/japanese/ebw3/files/ebw3d.sh.sample @@ -1,6 +1,18 @@ #!/bin/sh -if [ -f /usr/local/libexec/ebw3d \ - -a -f /usr/local/etc/ebw3d.conf ]; then - /usr/local/libexec/ebw3d > /var/log/ebw3d.log 2>&1 & - echo -n ' ebw3d' -fi + +case "$1" in +start) + if [ -f /usr/local/libexec/ebw3d \ + -a -f /usr/local/etc/ebw3d.conf ]; then + /usr/local/libexec/ebw3d > /var/log/ebw3d.log 2>&1 & + echo -n ' ebw3d' + fi + ;; +stop) + killall ebw3d && echo -n ' ebw3d' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac diff --git a/japanese/elvis/Makefile b/japanese/elvis/Makefile index cc18cdf7a226..6ebe7ad00db5 100644 --- a/japanese/elvis/Makefile +++ b/japanese/elvis/Makefile @@ -34,22 +34,7 @@ post-install: @${SH} ${PKGDIR}/REQ ${PKGNAME} INSTALL @if [ ! -f ${STARTUP_SCRIPT} ]; then \ ${ECHO} "Installing ${STARTUP_SCRIPT} startup file."; \ - ${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT}; \ - ${ECHO} 'virecovery=`${ECHO} /var/tmp/elv_*`' \ - >> ${STARTUP_SCRIPT}; \ - ${ECHO} 'if [ "$$virecovery" != '"'/var/tmp/elv_*' ]; then" \ - >> ${STARTUP_SCRIPT}; \ - ${ECHO} " ${ECHO} 'Recovering ja-elvis editor sessions'" \ - >> ${STARTUP_SCRIPT}; \ - ${ECHO} ' for i in $$virecovery; do' \ - >> ${STARTUP_SCRIPT}; \ - ${ECHO} " ${PREFIX}/bin/elvprsv "'$$i' \ - >> ${STARTUP_SCRIPT}; \ - ${ECHO} ' done' \ - >> ${STARTUP_SCRIPT}; \ - ${ECHO} 'fi' >> ${STARTUP_SCRIPT}; \ - ${CHMOD} 755 ${STARTUP_SCRIPT}; \ - ${CHOWN} bin.bin ${STARTUP_SCRIPT}; \ + ${INSTALL_SCRIPT} ${FILESDIR}/ja-elvis.sh ${STARTUP_SCRIPT};\ fi .include <bsd.port.mk> diff --git a/japanese/elvis/files/ja-elvis.sh b/japanese/elvis/files/ja-elvis.sh new file mode 100644 index 000000000000..10c4b961a0c7 --- /dev/null +++ b/japanese/elvis/files/ja-elvis.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + virecovery=`echo /var/tmp/elv_*` + if [ "$virecovery" != '/var/tmp/elv_*' ]; then + echo 'Recovering ja-elvis editor sessions' + for i in $$virecovery; do + ${PREFIX}/bin/elvprsv "$i" + done + fi + ;; +stop) + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/japanese/esecanna/files/esecanna.sh b/japanese/esecanna/files/esecanna.sh index 8a9bf51da9a7..2cbbbef82a07 100644 --- a/japanese/esecanna/files/esecanna.sh +++ b/japanese/esecanna/files/esecanna.sh @@ -1,20 +1,40 @@ #!/bin/sh -if [ -f /usr/local/vje30/.version ] \ - && grep -qw 'FREE TRIAL VERSION' /usr/local/vje30/.version \ - && [ X"$1" != X"-f" ]; then - echo "" - echo "esecanna:" - echo " Using VJE-Delta 3.0 trial, it is unable to connect to vjed on startup." - echo " Please execute \`$0 -f' manually" - echo " after once you run vje." - exit -fi - esecannaserver="!!PREFIX!!/sbin/esecannaserver" -if [ -x $esecannaserver ]; then - rm -f /tmp/.iroha_unix/IROHA - echo -n ' esecannai: ' - $esecannaserver -fi +case "$1" in +restart) + if [ -x $esecannaserver ]; then + rm -f /tmp/.iroha_unix/IROHA + echo -n ' esecannai: ' + $esecannaserver + fi + ;; +start) + if [ -f !!PREFIX!!/vje30/.version ] \ + && grep -qw 'FREE TRIAL VERSION' !!PREFIX!!/vje30/.version \ + && [ X"$1" != X"restart" ]; then + echo "" + echo "esecanna:" + echo " Using VJE-Delta 3.0 trial, it is unable to connect to vjed on startup." + echo " Please execute \`$0 restart' manually" + echo " after once you run vje." + exit 1 + fi + + if [ -x $esecannaserver ]; then + rm -f /tmp/.iroha_unix/IROHA + echo -n ' esecannai: ' + $esecannaserver + fi + ;; +stop) + killall $esecannaserver && echo -n ' esecannai' + ;; +*) + echo "Usage: `basename $0` {restart|start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/postgresql-tcltk/files/pgsql.sh.tmpl b/japanese/postgresql-tcltk/files/pgsql.sh.tmpl index 1aef9d941497..d3f0af6cb802 100644 --- a/japanese/postgresql-tcltk/files/pgsql.sh.tmpl +++ b/japanese/postgresql-tcltk/files/pgsql.sh.tmpl @@ -16,10 +16,24 @@ # environment variable in !!PG_PATH!!/.profile # -[ -d !!PG_PATH!!/lib ] && /sbin/ldconfig -m !!PG_PATH!!/lib +case "$1" in +start) + [ -d !!PG_PATH!!/lib ] && /sbin/ldconfig -m !!PG_PATH!!/lib -[ -x !!PG_PATH!!/bin/postmaster ] && { - su -l !!PGSQL_UID!! -c 'exec !!PG_PATH!!/bin/postmaster -i -S -o -F \ - -D!!PG_PATH!!/data > !!PG_PATH!!/errlog' - echo -n ' PostgreSQL' -} + [ -x !!PG_PATH!!/bin/postmaster ] && { + su -l !!PGSQL_UID!! -c 'exec !!PG_PATH!!/bin/postmaster -i -S -o -F \ + -D!!PG_PATH!!/data > !!PG_PATH!!/errlog' + echo -n ' PostgreSQL' + } + ;; +stop) + # XXX some pgsql user should check this --tg + killall !!PG_PATH!!/bin/postmaster + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/postgresql/files/pgsql.sh.tmpl b/japanese/postgresql/files/pgsql.sh.tmpl index 1aef9d941497..d3f0af6cb802 100644 --- a/japanese/postgresql/files/pgsql.sh.tmpl +++ b/japanese/postgresql/files/pgsql.sh.tmpl @@ -16,10 +16,24 @@ # environment variable in !!PG_PATH!!/.profile # -[ -d !!PG_PATH!!/lib ] && /sbin/ldconfig -m !!PG_PATH!!/lib +case "$1" in +start) + [ -d !!PG_PATH!!/lib ] && /sbin/ldconfig -m !!PG_PATH!!/lib -[ -x !!PG_PATH!!/bin/postmaster ] && { - su -l !!PGSQL_UID!! -c 'exec !!PG_PATH!!/bin/postmaster -i -S -o -F \ - -D!!PG_PATH!!/data > !!PG_PATH!!/errlog' - echo -n ' PostgreSQL' -} + [ -x !!PG_PATH!!/bin/postmaster ] && { + su -l !!PGSQL_UID!! -c 'exec !!PG_PATH!!/bin/postmaster -i -S -o -F \ + -D!!PG_PATH!!/data > !!PG_PATH!!/errlog' + echo -n ' PostgreSQL' + } + ;; +stop) + # XXX some pgsql user should check this --tg + killall !!PG_PATH!!/bin/postmaster + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/postgresql7/files/pgsql.sh.tmpl b/japanese/postgresql7/files/pgsql.sh.tmpl index 1aef9d941497..d3f0af6cb802 100644 --- a/japanese/postgresql7/files/pgsql.sh.tmpl +++ b/japanese/postgresql7/files/pgsql.sh.tmpl @@ -16,10 +16,24 @@ # environment variable in !!PG_PATH!!/.profile # -[ -d !!PG_PATH!!/lib ] && /sbin/ldconfig -m !!PG_PATH!!/lib +case "$1" in +start) + [ -d !!PG_PATH!!/lib ] && /sbin/ldconfig -m !!PG_PATH!!/lib -[ -x !!PG_PATH!!/bin/postmaster ] && { - su -l !!PGSQL_UID!! -c 'exec !!PG_PATH!!/bin/postmaster -i -S -o -F \ - -D!!PG_PATH!!/data > !!PG_PATH!!/errlog' - echo -n ' PostgreSQL' -} + [ -x !!PG_PATH!!/bin/postmaster ] && { + su -l !!PGSQL_UID!! -c 'exec !!PG_PATH!!/bin/postmaster -i -S -o -F \ + -D!!PG_PATH!!/data > !!PG_PATH!!/errlog' + echo -n ' PostgreSQL' + } + ;; +stop) + # XXX some pgsql user should check this --tg + killall !!PG_PATH!!/bin/postmaster + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/japanese/sj3-lib/Makefile b/japanese/sj3-lib/Makefile index 62b9a2eb114e..d5ecaa18f71b 100644 --- a/japanese/sj3-lib/Makefile +++ b/japanese/sj3-lib/Makefile @@ -30,13 +30,7 @@ do-configure: post-install: if [ ! -f ${STARTUP_SCRIPT} ]; then \ ${ECHO} "Installing ${STARTUP_SCRIPT} startup file."; \ - ${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT}; \ - ${ECHO} 'sj3=${PREFIX}/bin/sj3serv' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} 'if [ -f $$sj3 ]; then' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} ' $$sj3' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} "fi" >> ${STARTUP_SCRIPT} ; \ - ${CHMOD} 755 ${STARTUP_SCRIPT} ; \ - ${CHOWN} bin.bin ${STARTUP_SCRIPT}; \ + ${INSTALL_SCRIPT} ${FILESDIR}/sj3.sh ${STARTUP_SCRIPT}; \ fi ${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL diff --git a/japanese/sj3-lib/files/sj3.sh.in b/japanese/sj3-lib/files/sj3.sh.in new file mode 100644 index 000000000000..9361c1d8a604 --- /dev/null +++ b/japanese/sj3-lib/files/sj3.sh.in @@ -0,0 +1,22 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + sj3=${PREFIX}/bin/sj3serv + if [ -f $sj3 ]; then + $sj3 + fi + ;; +stop) + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/japanese/sj3-server/Makefile b/japanese/sj3-server/Makefile index 62b9a2eb114e..d5ecaa18f71b 100644 --- a/japanese/sj3-server/Makefile +++ b/japanese/sj3-server/Makefile @@ -30,13 +30,7 @@ do-configure: post-install: if [ ! -f ${STARTUP_SCRIPT} ]; then \ ${ECHO} "Installing ${STARTUP_SCRIPT} startup file."; \ - ${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT}; \ - ${ECHO} 'sj3=${PREFIX}/bin/sj3serv' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} 'if [ -f $$sj3 ]; then' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} ' $$sj3' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} "fi" >> ${STARTUP_SCRIPT} ; \ - ${CHMOD} 755 ${STARTUP_SCRIPT} ; \ - ${CHOWN} bin.bin ${STARTUP_SCRIPT}; \ + ${INSTALL_SCRIPT} ${FILESDIR}/sj3.sh ${STARTUP_SCRIPT}; \ fi ${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL diff --git a/japanese/sj3-server/files/sj3.sh.in b/japanese/sj3-server/files/sj3.sh.in new file mode 100644 index 000000000000..9361c1d8a604 --- /dev/null +++ b/japanese/sj3-server/files/sj3.sh.in @@ -0,0 +1,22 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + sj3=${PREFIX}/bin/sj3serv + if [ -f $sj3 ]; then + $sj3 + fi + ;; +stop) + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/japanese/sj3/Makefile b/japanese/sj3/Makefile index 62b9a2eb114e..d5ecaa18f71b 100644 --- a/japanese/sj3/Makefile +++ b/japanese/sj3/Makefile @@ -30,13 +30,7 @@ do-configure: post-install: if [ ! -f ${STARTUP_SCRIPT} ]; then \ ${ECHO} "Installing ${STARTUP_SCRIPT} startup file."; \ - ${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT}; \ - ${ECHO} 'sj3=${PREFIX}/bin/sj3serv' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} 'if [ -f $$sj3 ]; then' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} ' $$sj3' >> ${STARTUP_SCRIPT} ; \ - ${ECHO} "fi" >> ${STARTUP_SCRIPT} ; \ - ${CHMOD} 755 ${STARTUP_SCRIPT} ; \ - ${CHOWN} bin.bin ${STARTUP_SCRIPT}; \ + ${INSTALL_SCRIPT} ${FILESDIR}/sj3.sh ${STARTUP_SCRIPT}; \ fi ${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL diff --git a/japanese/sj3/files/sj3.sh.in b/japanese/sj3/files/sj3.sh.in new file mode 100644 index 000000000000..9361c1d8a604 --- /dev/null +++ b/japanese/sj3/files/sj3.sh.in @@ -0,0 +1,22 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + sj3=${PREFIX}/bin/sj3serv + if [ -f $sj3 ]; then + $sj3 + fi + ;; +stop) + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 |