~ubuntu-branches/ubuntu/trusty/hdparm/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/hdparm-functions

  • Committer: Steve Langasek
  • Date: 2012-10-25 04:41:31 UTC
  • mfrom: (2.1.10 sid)
  • Revision ID: steve.langasek@canonical.com-20121025044131-iivujash13dmd6dx
Merge version 9.42-1 from Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
        if hdparm_try_apm "$WANTED_DISK"; then
81
81
            if hdparm_is_on_battery; then
82
82
                hdparm_set_option -B128
83
 
                # we allow spindown, but set a spindown time of 3 minutes by
84
 
                # default so the disk isn't constantly power cycling on a busy
85
 
                # machine
86
 
                hdparm_set_option -S36
 
83
                # set a spindown time of 3 minutes by default so the disk isn't
 
84
                # constantly power cycling on a busy machine if spindown is
 
85
                # enabled
 
86
                hdparm_set_option -S36
87
87
            else
88
88
                hdparm_set_option -B254
89
89
            fi
100
100
                            COMMAND_LINE=1
101
101
                            ;;
102
102
                        *)
103
 
                            DISC=$KEY
 
103
                            if [ -h "$KEY" ]
 
104
                            then
 
105
                                DISC=$(readlink -m "$KEY")
 
106
                                DISC=${DISC%%[[:digit:]]*}
 
107
                            else
 
108
                                DISC=$KEY
 
109
                            fi
104
110
                            OPTIONS=$DEFAULT
105
111
                            OPT_QUIET=$DEF_QUIET
106
112
                            ;;