OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   08-Jun-2005 16:52:21
  Branch: HEAD                             Handle: 2005060815522100

  Modified files:
    openpkg-src/openpkg     HISTORY openpkg.spec

  Log:
    add a blind support for AIX system hooking

  Summary:
    Revision    Changes     Path
    1.267       +1  -1      openpkg-src/openpkg/HISTORY
    1.419       +50 -2      openpkg-src/openpkg/openpkg.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/HISTORY
  ============================================================================
  $ cvs diff -u -r1.266 -r1.267 HISTORY
  --- openpkg-src/openpkg/HISTORY       8 Jun 2005 13:25:48 -0000       1.266
  +++ openpkg-src/openpkg/HISTORY       8 Jun 2005 14:52:21 -0000       1.267
  @@ -2,7 +2,7 @@
   2005
   ====
   
  -20050608 part 2 of AIX port: RPM patches
  +20050608 part 2 of AIX port: RPM patches, system hooks
   20050607 part 1 of AIX port: RPM patches
   20050606 fix and enhance various vendor file trackings
   20050606 upgrade to latest version 20050606 of GNU config.* scripts
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/openpkg.spec
  ============================================================================
  $ cvs diff -u -r1.418 -r1.419 openpkg.spec
  --- openpkg-src/openpkg/openpkg.spec  8 Jun 2005 13:25:48 -0000       1.418
  +++ openpkg-src/openpkg/openpkg.spec  8 Jun 2005 14:52:21 -0000       1.419
  @@ -393,6 +393,7 @@
           Linux/*   ) l_build_path="/bin:/sbin:/usr/bin:/usr/sbin" ;;
           SunOS/*   ) 
l_build_path="/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin" ;;
           UnixWare/*) 
l_build_path="/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin" ;;
  +        AIX/*     ) 
l_build_path="/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin" ;;
           Darwin/*  ) l_build_path="/bin:/sbin:/usr/bin:/usr/sbin" ;;
           OSF1/V5.* ) l_build_path="/bin:/sbin:/usr/bin:/usr/sbin" ;;
           HP-UX/*   ) l_build_path="/bin:/sbin:/usr/bin:/usr/sbin" ;;
  @@ -404,6 +405,7 @@
           Linux/*   ) l_build_ldlp="/lib:/usr/lib" ;;
           SunOS/*   ) l_build_ldlp="/usr/lib:/usr/ccs/lib" ;;
           UnixWare/*) l_build_ldlp="/usr/lib:/usr/ccs/lib" ;;
  +        AIX/*     ) l_build_ldlp="/usr/lib:/usr/ccs/lib" ;;
           Darwin/*  ) l_build_ldlp="/usr/lib" ;;
           OSF1/V5.* ) l_build_ldlp="/usr/lib" ;;
           HP-UX/*   ) l_build_ldlp="/usr/lib" ;;
  @@ -1458,6 +1460,10 @@
                           
entry="${usr}:*:${uid}:${gid}:${realname}:${prefix}:${shell}"
                           update="(PATH=\$PATH:/usr/sbin; pwconv)"
                           ;;
  +                    AIX/* )
  +                        #   intentionally do nothing here
  +                        :
  +                        ;;
                       OSF1/V5.* )
                           file=/etc/passwd
                           
entry="${usr}:*:${uid}:${gid}:${realname}:${prefix}:${shell}"
  @@ -1470,6 +1476,7 @@
                           ;;
                       Darwin/* )
                           #   intentionally do nothing here
  +                        :
                           ;;
                   esac
                   case "$plid" in
  @@ -1482,6 +1489,9 @@
                           niutil -createprop . "/users/${usr}" home     
"${prefix}"
                           niutil -createprop . "/users/${usr}" shell    
"${shell}"
                           ;;
  +                    AIX/* )
  +                        mkuser id="${uid}" groups="${grp}" 
gecos="${realname}" home="${prefix}" shell="${shell}" "${usr}"
  +                        ;;
                       * )
                           cp $file $file.bak && \
                           (grep -v '^+:' $file.bak; echo $entry; grep '^+:' 
$file.bak) >$file
  @@ -1506,6 +1516,9 @@
                           niutil -createprop . "/groups/${grp}" gid   "${gid}"
                           niutil -createprop . "/groups/${grp}" users "${usr}"
                           ;;
  +                    AIX/* )
  +                        mkgroup id="${gid}" users="${usr}" "${grp}"
  +                        ;;
                       * )
                           #   add entry to group database
                           file=/etc/group
  @@ -1777,6 +1790,29 @@
                       ) || exit $?
                   fi
                   ;;
  +            AIX/* )
  +                if [ ! -f /etc/init.d/${name} ]; then
  +                    #   install transfer script
  +                    ( echo "#!/bin/sh"
  +                      echo "##"
  +                      echo "##  ${name} -- startup/shutdown transfer script 
for OpenPKG ${prefix} hierarchy"
  +                      echo "##"
  +                      echo ""
  +                      echo "[ ! -f ${prefix}/etc/rc ] && exit 0"
  +                      echo "case \$1 in"
  +                      echo "    start ) exec ${prefix}/etc/rc all start ;;"
  +                      echo "    stop  ) exec ${prefix}/etc/rc all stop  ;;"
  +                      echo "esac"
  +                    ) >/etc/init.d/${name}
  +                    chmod 755 /etc/init.d/${name}
  +                    #   create corresponding symbolic links
  +                    ( cd /etc/rc.d
  +                      ln -s ../../init.d/${name} rc2.d/S99${name}
  +                      ln -s ../../init.d/${name} rc0.d/K00${name}
  +                      ln -s ../../init.d/${name} rc1.d/K00${name}
  +                    ) || exit $?
  +                fi
  +                ;;
               OSF1/V5.* )
                   if [ ! -f /sbin/init.d/${name} ]; then
                       #   install transfer script
  @@ -1917,7 +1953,7 @@
                       fi
                   fi
                   ;;
  -            SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* | UnixWare/* )
  +            SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* | UnixWare/* | AIX/* )
                   exists=`crontab -l | grep "$prefix/etc/rc"`
                   if [ ".$exists" = . ]; then
                       EDITOR=/tmp/vipw.$$
  @@ -2129,6 +2165,9 @@
                           ( PATH="$PATH:/usr/sbin"; pwconv ) || exit $?
                           rm -f /etc/passwd.bak >/dev/null 2>&1
                           ;;
  +                    AIX/* )
  +                        rmuser -p "${usr}"
  +                        ;;
                       OSF1/V5.* )
                           cp /etc/passwd /etc/passwd.bak && \
                           grep -v "^${usr}:" /etc/passwd.bak >/etc/passwd
  @@ -2161,6 +2200,9 @@
                       Darwin/* )
                           niutil -destroy . "/groups/${grp}"
                           ;;
  +                    AIX/* )
  +                        rmgroup "${grp}"
  +                        ;;
                       * )
                           cp /etc/group /etc/group.bak && \
                           grep -v "^${grp}:" /etc/group.bak >/etc/group
  @@ -2259,6 +2301,12 @@
                   rm -f /etc/rc0.d/K00${name} >/dev/null 2>&1
                   rm -f /etc/rc1.d/K00${name} >/dev/null 2>&1
                   ;;
  +            AIX/* )
  +                rm -f /etc/init.d/${name} >/dev/null 2>&1
  +                rm -f /etc/rc2.d/S99${name} >/dev/null 2>&1
  +                rm -f /etc/rc1.d/K00${name} >/dev/null 2>&1
  +                rm -f /etc/rc0.d/K00${name} >/dev/null 2>&1
  +                ;;
               OSF1/V5.* )
                   rm -f /sbin/init.d/${name} >/dev/null 2>&1
                   rm -f /sbin/rc3.d/S99${name} >/dev/null 2>&1
  @@ -2310,7 +2358,7 @@
                       fi
                   fi
                   ;;
  -            SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* | UnixWare/* )
  +            SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* | UnixWare/* | AIX/* )
                   EDITOR=/tmp/vipw.$$
                   VISUAL="$EDITOR"
                   export EDITOR
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to