~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to debian/zaptel.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-08-28 22:58:23 UTC
  • mfrom: (11.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080828225823-r8bdunirm8hmc76m
Tags: 1:1.4.11~dfsg-2
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
  FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
  when Asterisk is already running.
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
  asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
* Using dh_lintian for lintian overrides, hence requiring debhelper 6.0.7.
* Lintian: we know we have direct changes. Too bad we're half-upstream :-(
* Fix doc-base section names. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#          <failed-install-package> <version> `removing'
12
12
#          <conflicting-package> <version>
13
13
 
14
 
DYNFS=`ps ax | grep -v grep`
 
14
mknod_safe() {
 
15
        if [ -c $1 ]; then return; fi
 
16
        mknod "$@" || true
 
17
}
 
18
 
 
19
# stolen from udev
 
20
chrooted() {
 
21
  if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
 
22
  then
 
23
    # the devicenumber/inode pair of / is the same as that of /sbin/init's
 
24
    # root, so we're *not* in a chroot and hence return false.
 
25
    return 1
 
26
  fi
 
27
  return 0
 
28
}
15
29
 
16
30
case "$1" in
17
31
    configure)
18
32
 
19
33
        #MAKEDEV zaptel
20
34
 
21
 
        if ! echo $DYNFS | grep -q devfsd || echo $DYNFS | grep -q udevd ; then 
 
35
        if [ ! chrooted -a ! -e /dev/.devfsd -a ! -e /dev/.udevdb -a ! -e /dev/.udev ]; then
22
36
                mkdir -p /dev/zap
23
 
                rm -f /dev/zap/ctl
24
 
                rm -f /dev/zap/channel
25
 
                rm -f /dev/zap/pseudo
26
 
                rm -f /dev/zap/timer
27
 
                rm -f /dev/zap/253
28
 
                rm -f /dev/zap/252
29
 
                rm -f /dev/zap/251
30
 
                rm -f /dev/zap/250
31
 
                mknod /dev/zap/ctl c 196 0
32
 
                mknod /dev/zap/timer c 196 253
33
 
                mknod /dev/zap/channel c 196 254
34
 
                mknod /dev/zap/pseudo c 196 255
35
 
                N=1; 
36
 
                for N in `seq 250`; do
37
 
                        rm -f /dev/zap/$N; 
38
 
                        mknod /dev/zap/$N c 196 $N; 
39
 
                        N=`expr $N + 1` 
 
37
                mknod_safe /dev/zap/ctl c 196 0
 
38
                mknod_safe /dev/zap/transcode c 196 250
 
39
                mknod_safe /dev/zap/timer c 196 253
 
40
                mknod_safe /dev/zap/channel c 196 254
 
41
                mknod_safe /dev/zap/pseudo c 196 255
 
42
                for N in `seq 249`; do
 
43
                        mknod_safe /dev/zap/$N c 196 $N
40
44
                done
41
45
                chown 0:dialout /dev/zap/ -R
42
46
                chmod 0660 /dev/zap/*
43
 
        else
44
 
                echo "**** Dynamic filesystem detected -- not creating device nodes"
45
 
                echo "**** If you are running udev, read README.Debian"
46
47
        fi
47
48
 
48
49
    ;;