Pārlūkot izejas kodu

remove stale temp files; cosmetics

Christoph Schug 22 gadi atpakaļ
vecāks
revīzija
866ac614b0
2 mainītis faili ar 13 papildinājumiem un 3 dzēšanām
  1. 1 0
      openpkg/README
  2. 12 3
      openpkg/openpkg.spec

+ 1 - 0
openpkg/README

@@ -146,6 +146,7 @@
   FreeBSD (ix86)           4.8, 5.0         4.[0-7]              -
   Debian GNU/Linux (ix86)  3.0, 2.2         -                    -
   RedHat Linux (ix86)      -                8.0, 9.0             7.[0-2]
+  Gentoo Linux (ix86)      -                -                    1.4
   Solaris (SPARC64)        8, 9             2.6, 7               -
   Solaris (ix86)           -                -                    8, 9
   NetBSD (ix86)            -                -                    1.5.[0-2], 1.6[0-1]

+ 12 - 3
openpkg/openpkg.spec

@@ -39,7 +39,7 @@
 #   o any cc(1)
 
 #   the package version/release
-%define       V_openpkg  20030918
+%define       V_openpkg  20030922
 
 #   the used software versions
 %define       V_rpm      4.2.1
@@ -1308,6 +1308,7 @@ Provides:     OpenPKG
                         ( grep -v local_startup /etc/rc.conf.bak
                           echo "local_startup=\"/etc/rc.d $local_startup\""
                         ) >/etc/rc.conf
+                        rm -f /etc/rc.conf.bak >/dev/null 2>&1
                       fi
                     ) || exit $?
                     #   install transfer script
@@ -1526,7 +1527,7 @@ Provides:     OpenPKG
                     rm -f ${darwin_rc_dir}/${name} >/dev/null 2>&1
                     ( echo "#!/bin/sh"
                       echo "##"
-                      echo "##  /System/Library/StartupItems/${name}/${name}"
+                      echo "##  ${darwin_rc_dir}/${name}"
                       echo "##      -- startup transfer script for OpenPKG ${prefix} hierarchy"
                       echo "##"
                       echo ""
@@ -1706,6 +1707,7 @@ Provides:     OpenPKG
         else
             cp /etc/shells /etc/shells.bak && \
             grep -v "^${shell}" /etc/shells.bak >/etc/shells
+            rm -f /etc/shells.bak >/dev/null 2>&1
         fi
     fi
 
@@ -1733,20 +1735,24 @@ Provides:     OpenPKG
                         cp /etc/master.passwd /etc/master.passwd.bak && \
                         grep -v "^${usr}:" /etc/master.passwd.bak >/etc/master.passwd
                         ( PATH="$PATH:/usr/sbin"; pwd_mkdb -p /etc/master.passwd ) || exit $?
+                        rm -f /etc/master.passwd.bak >/dev/null 2>&1
                         ;;
                     Linux/* | SunOS/5.* )
                         cp /etc/passwd /etc/passwd.bak && \
                         grep -v "^${usr}:" /etc/passwd.bak >/etc/passwd
                         ( PATH="$PATH:/usr/sbin"; pwconv ) || exit $?
+                        rm -f /etc/passwd.bak >/dev/null 2>&1
                         ;;
                     OSF1/V5.* )
                         cp /etc/passwd /etc/passwd.bak && \
                         grep -v "^${usr}:" /etc/passwd.bak >/etc/passwd
                         ( PATH="$PATH:/usr/sbin"; mkpasswd /etc/passwd ) || exit $?
+                        rm -f /etc/passwd.bak >/dev/null 2>&1
                         ;;
                     HP-UX/* )
                         cp /etc/passwd /etc/passwd.bak && \
                         grep -v "^${usr}:" /etc/passwd.bak >/etc/passwd
+                        rm -f /etc/passwd.bak >/dev/null 2>&1
                         ;;
                     Darwin/* )
                         niutil -destroy . "/users/${usr}"
@@ -1772,13 +1778,14 @@ Provides:     OpenPKG
                     * )
                         cp /etc/group /etc/group.bak && \
                         grep -v "^${grp}:" /etc/group.bak >/etc/group
+                        rm -f /etc/group.bak >/dev/null 2>&1
                         ;;
                 esac
             fi
         fi
     done
 
-    #   remove the startup/shutdown transfer ripts
+    #   remove the startup/shutdown transfer scripts
     name=`echo "$prefix" | sed -e 's;/;;g'`
     if [ ".$cusr" != ".root" ]; then
         echo "openpkg:WARNING: skipping deletion of system run-command hooks" 1>&2
@@ -1858,6 +1865,7 @@ Provides:     OpenPKG
             Darwin/* )
                 cp /etc/hostconfig /etc/hostconfig.bak && \
                 grep -v "^OPENPKG_${name}=" /etc/hostconfig.bak >/etc/hostconfig
+                rm -f /etc/hostconfig.bak >/dev/null 2>&1
                 rm -rf /System/Library/StartupItems/${name} >/dev/null 2>&1
                 ;;
         esac
@@ -1877,6 +1885,7 @@ Provides:     OpenPKG
                     cat /etc/crontab.bak |\
                     sed -e "/<OpenPKG prefix=$p pkg=openpkg>/,/<\\/OpenPKG>/d" \
                     >/etc/crontab
+                    rm -f /etc/crontab.bak >/dev/null 2>&1
                 fi
                 ;;
             SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* )