File: 14simple-cdd

package info (click to toggle)
simple-cdd 0.6.9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 344 kB
  • sloc: python: 1,904; sh: 111; makefile: 13
file content (45 lines) | stat: -rwxr-xr-x 1,055 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh

# Copyright 2005-2006 Vagrant Cascadian <vagrant@freegeek.org>.
# Copyright 2006 Gustavo Franco <stratus@debian.org>.
# Licensed under the terms of the GNU General Public License,
# version 2 or any later version.

# handle profile-specific post-install scripts

SIMPLE_CDD_DIR=/cdrom/simple-cdd

set -e

if [ ! -d "$SIMPLE_CDD_DIR" ]; then
    exit 1
fi

# load debconf
. /usr/share/debconf/confmodule

db_get simple-cdd/profiles || true
profiles="$(echo default $RET | tr ',' ' ')"

echo "simple-cdd post-install scripts..."

echo "profiles: $profiles"

cd $SIMPLE_CDD_DIR

mkdir -p /target/usr/local/simple-cdd

for p in $profiles ; do
  echo
  if [ -x "$p.postinst" ]; then
    echo "running postinstall script for: $p"
    cp $p.postinst /target/usr/local/simple-cdd
    in-target /usr/local/simple-cdd/$p.postinst
  elif [ -r "$p.postinst" ]; then
    echo "WARNING: postinstall script not executable: $p.postinst"
  else
    echo "No postinstall script for: $p"
  fi
done

echo "Finished running simple-cdd profile post-install scripts"