File: udev.postrm

package info (click to toggle)
udev 0.105-4etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 672 kB
  • ctags: 54
  • sloc: sh: 1,636; makefile: 273
file content (40 lines) | stat: -rw-r--r-- 842 bytes parent folder | download | duplicates (3)
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
#!/bin/sh -e

cleanup_rulesd() {
  [ -d /etc/udev/rules.d/ ] || return 0

  # delete broken symlinks
  find /etc/udev/rules.d/ -type l -not -exec test -e {} \; -print0 \
	| xargs --no-run-if-empty --null rm
  rmdir --ignore-fail-on-non-empty /etc/udev/rules.d/ /etc/udev/ || true
}

warn_user() {
  echo
  echo "**************************************************************"
  echo "* Please reboot your system as soon as possible!"
  echo "* After removing udev the system may not be fully functional."
  echo "**************************************************************"
  echo
}

case "$1" in
    purge)
    cleanup_rulesd
    ;;

    remove)
    warn_user
    ;;

    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

    *)
    echo "$0 called with unknown argument '$1'" >&2
    exit 1
    ;;
esac

#DEBHELPER#