File: preinst

package info (click to toggle)
ifupdown 0.8.44
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 952 kB
  • sloc: ansic: 2,781; sh: 899; perl: 513; makefile: 90
file content (20 lines) | stat: -rw-r--r-- 473 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
set -e

if [ ! -d /etc/network ]; then
  mkdir -p /etc/network
fi

if [ -f /etc/network/interfaces ] && ! grep -q '^[^#]' /etc/network/interfaces
then
  f=/etc/network/interfaces
  if [ `md5sum < $f | cut -f1 -d ' '` = "4ed352919f69a77ad302ad1593204405" ]; then
    if [ `wc -c < /etc/network/interfaces` -eq 2466 ]; then
      echo -n "Removing old dummy /etc/network/interfaces: "
      rm /etc/network/interfaces
      echo "done."
    fi
  fi
fi

#DEBHELPER#