Changeset 59 for trunk/samhain-install.sh.in
- Timestamp:
- Aug 31, 2006, 9:25:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samhain-install.sh.in
r1 r59 672 672 realname="$user" 673 673 case "$platform" in 674 FreeBSD/* | NetBSD/* )674 FreeBSD/* | NetBSD/* | OpenBSD/* ) 675 675 file=/etc/master.passwd 676 676 entry="${user}:*:${uid}:${gid}::0:0:${realname}:${home}:${shell}" … … 785 785 ;; 786 786 787 OpenBSD/*) 788 test -z "$verbose" || echo " OpenBSD system detected" 789 grep '^## begin @install_name@' /etc/rc.local >/dev/null 2>&1 790 if [ $? -eq 0 ]; then 791 RCLOCALTMP=`mktemp /etc/rc.local.XXXXXXXXXX` || exit 1 792 sed "/^## begin @install_name@/,/^## end @install_name@/d" /etc/rc.local >$RCLOCALTMP || exit 1 793 cat $RCLOCALTMP >/etc/rc.local || exit 1 794 rm -f $RCLOCALTMP || exit 1 795 if test x"$act" = xuboot; then 796 echo " uninstalling from /etc/rc.local completed" 797 fi 798 fi 799 if test x"$act" = xboot; then 800 echo "## begin @install_name@" >>/etc/rc.local || exit 1 801 echo "if [ -x @sbindir@/@install_name@ ]; then" >>/etc/rc.local || exit 1 802 echo " @sbindir@/@install_name@ start" >>/etc/rc.local || exit 1 803 echo "fi" >>/etc/rc.local || exit 1 804 echo "## end @install_name@" >>/etc/rc.local || exit 1 805 echo " installing to /etc/rc.local completed" 806 fi 807 exit 0 808 ;; 809 810 NetBSD/*) 811 test -z "$verbose" || echo " NetBSD system detected" 812 if test -f /etc/rc.subr; then 813 DVER="FreeBSD" 814 rc_main=${DESTDIR}/etc/rc.d 815 rc_dirz= 816 rc_inst="chmod 755 /etc/rc.d/@install_name@" 817 rc_uinst="rm -f /etc/rc.d/@install_name@" 818 else 819 echo "${0}: unsupported platform ${platform} (too old)" 820 exit 1 821 fi 822 ;; 823 787 824 FreeBSD/* ) 788 DVER="FreeBSD"789 825 test -z "$verbose" || echo " FreeBSD system detected" 790 rc_main=${DESTDIR}/usr/local/etc/rc.d 791 rc_dirz= 792 rc_inst="mv /usr/local/etc/rc.d/@install_name@ /usr/local/etc/rc.d/@install_name@.sh && chmod 755 /usr/local/etc/rc.d/@install_name@.sh" 793 rc_uinst="rm -f /usr/local/etc/rc.d/@install_name@.sh; echo You may want to remove ${rc_main} from local_startup in /etc/rc.conf; echo if it is empty" 826 if test -f /etc/rc.subr; then 827 DVER="FreeBSD" 828 rc_main=${DESTDIR}/etc/rc.d 829 rc_dirz= 830 rc_inst="chmod 755 /etc/rc.d/@install_name@" 831 rc_uinst="rm -f /etc/rc.d/@install_name@" 832 else 833 DVER="Solaris" 834 rc_main=${DESTDIR}/usr/local/etc/rc.d 835 rc_dirz= 836 rc_inst="mv /usr/local/etc/rc.d/@install_name@ /usr/local/etc/rc.d/@install_name@.sh && chmod 755 /usr/local/etc/rc.d/@install_name@.sh" 837 rc_uinst="rm -f /usr/local/etc/rc.d/@install_name@.sh" 838 fi 794 839 if test x"$act" = xboot 795 840 then … … 797 842 test x"$act" = xboot && mkdir ${rc_main} 798 843 fi 844 if test "x$DVER" = "xSolaris"; then 799 845 ( . /etc/defaults/rc.conf 800 846 . /etc/rc.conf … … 814 860 fi 815 861 ) 816 fi 862 fi 863 fi 817 864 ;; 865 818 866 SunOS/5.* ) 819 867 DVER="Solaris" 868 DVER_REAL="Solaris" 820 869 test -z "$verbose" || echo " Solaris system detected" 821 870 rc_dirz= … … 824 873 rc_uinst="rm -f ${DESTDIR}/etc/init.d/@install_name@; rm -f ${DESTDIR}/etc/rc0.d/K10@install_name@; rm -f ${DESTDIR}/etc/rc1.d/K10@install_name@; rm -f ${DESTDIR}/etc/rc3.d/S99@install_name@" 825 874 ;; 875 826 876 Linux/*) 827 877 rlv="2 3 4 5" … … 1005 1055 ${mkinstalldirs} ${rc_main} 1006 1056 # 1007 if test x"$ DVER" = xSolaris; then1057 if test x"${DVER_REAL}" = xSolaris; then 1008 1058 ${mkinstalldirs} ${DESTDIR}/etc/rc0.d 1009 1059 ${mkinstalldirs} ${DESTDIR}/etc/rc1.d
Note:
See TracChangeset
for help on using the changeset viewer.