]>
Commit | Line | Data |
---|---|---|
f0ab59d0 PG |
1 | #!/bin/sh |
2 | # | |
3 | # 855resolution This shell script takes care of setting date from ntp server on startup | |
4 | # | |
5 | # chkconfig: 2345 15 89 | |
6 | # description: set resolution for your laptop | |
7 | # processname: 855resolution | |
8 | ||
9 | # Source function library. | |
10 | . /etc/rc.d/init.d/functions | |
11 | ||
12 | # Get service config | |
13 | if [ ! -f /etc/sysconfig/855resolution ]; then | |
14 | exit 0 | |
15 | fi | |
16 | ||
17 | ||
18 | # See how we were called. | |
19 | case "$1" in | |
20 | start|restart|reload|force-reload) | |
21 | grep -v "^#" /etc/sysconfig/855resolution | while read line | |
22 | do | |
23 | #TODO: make here some better better args checking | |
24 | mode=`echo ${line} | awk '{ print $1;}'` | |
25 | width=`echo ${line} | awk '{ print $2;}'` | |
26 | height=`echo ${line} | awk '{ print $3;}'` | |
27 | run_cmd "Replacing Mode ${mode} of your card with ${width}x${height}" "855resolution ${mode} ${width} ${height}" | |
28 | done | |
29 | ;; | |
30 | stop) | |
31 | # nothing to do | |
32 | ;; | |
33 | status) | |
34 | 855resolution -l | |
35 | ;; | |
36 | *) | |
37 | msg_usage "$0 {start|stop|restart|reload|force-reload|status}" | |
38 | exit 3 | |
39 | esac |