File: lessdisks-purge

package info (click to toggle)
lessdisks 0.5.3cvs.20040906-16
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,480 kB
  • ctags: 271
  • sloc: sh: 3,058; makefile: 92
file content (38 lines) | stat: -rwxr-xr-x 1,010 bytes parent folder | download
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
#!/bin/sh

# copyright 2004 vagrant@freegeek.org, distributed under the terms of the
# GNU General Public License version 2 or any later version.

if [ -r /etc/lessdisks-install.conf ]; then
  . /etc/lessdisks-install.conf
fi

if [ -r /etc/lessdisks/server.config ]; then
  . /etc/lessdisks/server.config
fi

if [ -z "$lessdisks_path" ]; then
  lessdisks_path="$1"
fi

if [ -z "$lessdisks_path" ]; then
  echo "no lessdisks_path variable set... i'm getting the heck out of here!"
  exit 1
fi

if [ "/var/lib/lessdisks" = "$lessdisks_path" ] || [ "/var/lib/lessdisks/" = "$lessdisks_path" ]; then
  umount /var/lib/lessdisks/proc
  rm -rf /var/lib/lessdisks
else
  echo "gosh.  you must be an advanced user:"
  echo "you probably want to:"
  echo "rm -rf $lessdisks_path"
  echo "apt-get --purge remove lessdisks"
  echo "rm -f /etc/lessdisks-install.conf* /etc/lessdisks"
  echo "but i'm scared to do it myself."
  exit 2
fi

apt-get --purge remove lessdisks

rm -f /etc/lessdisks-install.conf* /etc/lessdisks