Browse Source

for 2005090910392401046

git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6375 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Clifford Wolf 19 years ago
parent
commit
accbff2e4b
5 changed files with 0 additions and 226 deletions
  1. +0
    -13
      package/base/postinstall/postinstall-example.sh
  2. +0
    -38
      package/base/postinstall/postinstall.cache
  3. +0
    -8
      package/base/postinstall/postinstall.conf
  4. +0
    -41
      package/base/postinstall/postinstall.desc
  5. +0
    -126
      package/base/postinstall/postinstall.sh

+ 0
- 13
package/base/postinstall/postinstall-example.sh

@ -1,13 +0,0 @@
#! /bin/bash
if any_installed ".*\.so"; then
echo "dynamic libraries installed, run ldconfig!"
fi
if any_removed ".*\.so"; then
echo "dynamic libraries removed, run ldconfig!"
fi
all_installed ".*" | while read M; do echo "Installed: $M"; done
all_removed ".*" | while read M; do echo "Removed: $M"; done

+ 0
- 38
package/base/postinstall/postinstall.cache

@ -1,38 +0,0 @@
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN ---
[COPY]
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY] Please add additional copyright information _after_ the line containing
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
[COPY]
[COPY] ROCK Linux: rock-src/package/base/psmisc/psmisc.desc
[COPY] ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
[COPY]
[COPY] This program is free software; you can redistribute it and/or modify
[COPY] it under the terms of the GNU General Public License as published by
[COPY] the Free Software Foundation; either version 2 of the License, or
[COPY] (at your option) any later version. A copy of the GNU General Public
[COPY] License can be found at Documentation/COPYING.
[COPY]
[COPY] Many people helped and are helping developing ROCK Linux. Please
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM
[COPY] file for details.
[COPY]
[COPY] --- ROCK-COPYRIGHT-NOTE-END ---
[TIMESTAMP] 1123783349 Thu Aug 11 20:02:29 2005 (3)
[TIMESTAMP] 1124143545 Tue Aug 16 00:05:45 2005 (9)
[CONFIG-ID] TRUNK-x86-reference
[ROCKVER] TRUNK
[LOGS] 3-postinstall.log 9-postinstall.log
[BUILDTIME] 614 (3)
[BUILDTIME] 1287 (9)
[SIZE] 0.02 MB, 10 files
[DEP] 00-dirtree bash2 coreutils findutils gawk gcc34 grep mktemp sed
[PROVIDES] postinstall

+ 0
- 8
package/base/postinstall/postinstall.conf

@ -1,8 +0,0 @@
postinstall_main ()
{
mkdir -p $root/etc/postinstall/postremove
cp $confdir/postinstall.sh $root/usr/sbin/postinstall
chmod +x $root/usr/sbin/postinstall
}
mainfunction=postinstall_main

+ 0
- 41
package/base/postinstall/postinstall.desc

@ -1,41 +0,0 @@
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN ---
[COPY]
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY] Please add additional copyright information _after_ the line containing
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
[COPY]
[COPY] ROCK Linux: rock-src/package/base/psmisc/psmisc.desc
[COPY] ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
[COPY]
[COPY] This program is free software; you can redistribute it and/or modify
[COPY] it under the terms of the GNU General Public License as published by
[COPY] the Free Software Foundation; either version 2 of the License, or
[COPY] (at your option) any later version. A copy of the GNU General Public
[COPY] License can be found at Documentation/COPYING.
[COPY]
[COPY] Many people helped and are helping developing ROCK Linux. Please
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM
[COPY] file for details.
[COPY]
[COPY] --- ROCK-COPYRIGHT-NOTE-END ---
[I] runs post-install/-remove actions
[T] Some packages require actions to be performed after files have been
[T] installed or removed.
[T] postinstall is used to execute the postinstall scripts that every
[T] package can supply.
[A] Stefan Fiedler <stefan dot fiedler at students dot jku dot ac>
[M] Stefan Fiedler <stefan dot fiedler at students dot jku dot ac>
[C] base/tool
[F] CORE
[L] OpenSource
[S] Stable
[V] 0.1
[P] X -?-3-----9 186.500

+ 0
- 126
package/base/postinstall/postinstall.sh

@ -1,126 +0,0 @@
#!/bin/bash
#
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/scripts/Build-Pkg
# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
# Helper functions
is_installed()
{
if [ $install_checks_true == 1 ]; then return 0; fi
[ -e "$1" ];
}
is_removed()
{
if [ $remove_checks_true == 1 ]; then return 0; fi
[ ! -e "$1" ];
}
all_installed() {
while read dummy M; do
[ -e "/$M" ] && echo "/$M"
done < <( cat /var/adm/postinstall/*-install.?????? 2> /dev/null | grep "$1"; ) | sort -u
}
all_removed() {
while read dummy M; do
[ -e "/$M" ] || echo "/$M"
done < <( cat /var/adm/postinstall/*-remove.?????? 2> /dev/null | grep "$1"; ) | sort -u
}
all_touched() {
while read dummy M; do
[ -e "/$M" ] || echo "/$M"
done < <( cat /var/adm/postinstall/*-install.?????? /var/adm/postinstall/*-remove.?????? 2> /dev/null | grep "$1"; ) | sort -u
}
any_installed() {
if [ $install_checks_true == 1 ]; then return 0; fi
cat /var/adm/postinstall/*-install.?????? 2> /dev/null | grep -q "$1"
}
any_removed() {
if [ $remove_checks_true == 1 ]; then return 0; fi
cat /var/adm/postinstall/*-remove.?????? 2> /dev/null | grep -q "$1"
}
any_touched() {
if [ $install_checks_true == 1 ]; then return 0; fi
if [ $remove_checks_true == 1 ]; then return 0; fi
cat /var/adm/postinstall/*-install.?????? /var/adm/postinstall/*-remove.?????? 2> /dev/null | grep -q "$1"
}
install_checks_true=0
remove_checks_true=0
while [ "$#" -ge 1 ]; do
case "$1" in
-a)
install_checks_true=1
shift
;;
-r)
remove_checks_true=1
shift
;;
*)
echo
echo "Usage: $0 [ -a ] [ -r ]"
echo
echo " -a execute all postinstall actions"
echo " -r execute all postremove actions"
echo
exit 1
;;
esac
done
# Backup postinstall scripts for postremove operation
all_installed "etc/postinstall/.*\.sh" | while read M;
do
echo "Creating backup of $M in /etc/postinstall/postremove/"
cp -af "$M" "/etc/postinstall/postremove/${M##*/}"
done
# Execute removed postinstall scripts
all_removed "etc/postinstall/.*\.sh" | while read M;
do
P="/etc/postinstall/postremove/${M##*/}"
if [ -e $P ]; then
echo "Executing postremove script $P"
. "$P"
rm -f "$P"
else
echo "WARNING: backup of $M not found in /etc/postinstall/postremove"
fi
done
# Source postinstall scripts
for N in /etc/postinstall/*.sh;
do
echo "Executing postinstall script $N"
. "$N"
done
# Remove the postinstall/postremove logs
rm -f /var/adm/postinstall/*-{install,remove}.??????

Loading…
Cancel
Save