~tormodvolden/ubuntu/karmic/laptop-mode-tools/dupl-hook

« back to all changes in this revision

Viewing changes to install.sh

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2005-11-29 17:27:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051129172751-jbz1k7dt7yg948x2
Tags: 1.11-1ubuntu1
Don't ship acpi scripts (we handle that ourselves)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
INSTALL="install -o root -g root"
31
31
 
32
 
mkdir -p /etc/laptop-mode
 
32
mkdir -p /etc/laptop-mode /etc/laptop-mode/batt-start /etc/laptop-mode/batt-stop /etc/laptop-mode/lm-ac-start /etc/laptop-mode/lm-ac-stop /etc/laptop-mode/nolm-ac-start /etc/laptop-mode/nolm-ac-stop
 
33
 
 
34
ALREADY_EXISTED=0
33
35
 
34
36
if [ -f /etc/laptop-mode/laptop-mode.conf ] ; then
35
37
        echo "Not reinstalling configuration file: /etc/laptop-mode/laptop-mode.conf exists."
 
38
        ALREADY_EXISTED=1
36
39
elif ( ! $INSTALL -m 600 etc/laptop-mode/laptop-mode.conf /etc/laptop-mode ) ; then
37
40
        echo "$0: Failed to install configuration file in /etc/laptop-mode/laptop-mode.conf. Installation failed."
38
41
        exit 12
39
42
fi
40
43
 
41
 
if [ -f /etc/default/laptop-mode ] ; then
 
44
if [ -f /etc/default/laptop-mode -a "$ALREADY_EXISTED" -eq 0 ] ; then
42
45
        echo "Found old configuration file in /etc/default/laptop-mode. Moving to the new location."
43
46
        if ( ! mv /etc/default/laptop-mode /etc/laptop-mode/laptop-mode.conf ) ; then
44
47
                echo "$0: Failed to move old configuration file to new location."
45
48
                exit 20
46
49
        fi
47
50
fi
48
 
if [ -f /etc/sysconfig/laptop-mode ] ; then
 
51
if [ -f /etc/sysconfig/laptop-mode -a "$ALREADY_EXISTED" -eq 0 ] ; then
49
52
        echo "Found old configuration file in /etc/sysconfig/laptop-mode. Moving to the new location."
50
53
        if ( ! mv /etc/sysconfig/laptop-mode /etc/laptop-mode/laptop-mode.conf ) ; then
51
54
                echo "$0: Failed to move old configuration file to new location."
53
56
        fi
54
57
fi
55
58
 
 
59
 
 
60
if [ -f /etc/laptop-mode/lm-profiler.conf ] ; then
 
61
        echo "Configuration file /etc/laptop-mode/lm-profiler.conf already exists."
 
62
elif ( ! $INSTALL -m 600 etc/laptop-mode/lm-profiler.conf /etc/laptop-mode ) ; then
 
63
        echo "$0: Failed to install configuration file in /etc/laptop-mode/lm-profiler.conf. Installation failed."
 
64
        exit 12
 
65
fi
 
66
 
 
67
 
56
68
if ( ! $INSTALL -m 700 usr/sbin/laptop_mode /usr/sbin ) ; then
57
69
        echo "$0: Failed to install /usr/sbin/laptop_mode. Installation failed."
58
70
        exit 11
63
75
        exit 25
64
76
fi
65
77
 
 
78
if ( ! $INSTALL -m 700 usr/sbin/lm-profiler /usr/sbin ) ; then
 
79
        echo "$0: Failed to install /usr/sbin/lm-profiler. Installation failed."
 
80
        exit 11
 
81
fi
 
82
 
66
83
ACPI_DONE=0
67
84
if [ ! -d /proc/pmu -a -d /etc/acpi ] ; then
68
85
        mkdir -p /etc/acpi/actions