-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup
executable file
·49 lines (39 loc) · 1.09 KB
/
startup
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
41
42
43
44
45
46
47
48
49
#! /bin/sh
# You want to use sudo.
# You can run 'startup' manually, but also S99rss can start it up on
# boot up.
root=/home/$USER/bin/root
if [ ! -f $root ]; then
root=sudo
fi
dir=$(dirname $0)
$root chvt 1
# The following is ugly - opening up world write perms. Probably
# should use a helper script to do this.
$root chmod 666 /dev/tty1
# /usr/bin/fgconsole needs this to find the current console
$root chmod 666 /dev/console
# Arrange to startup automatically on boot. 'rc3.d' is for non-GUI
# display, and 'rc5.d' for graphical. In graphical mode, we force a
# chvt - as above, to get to the console
#
if [ ! -f /etc/init.d/rss ]; then
$sudo cp S99rss /etc/init.d/rss
$sudo ln -s ../init.d/rss /etc/rc3.d/S99rss
$sudo ln -s ../init.d/rss /etc/rc5.d/S99rss
fi
# We need access to:
#
# /dev/input/event0 - touchpad input, and
# /dev/fb0 - image drawing
#
# For this to work, we need to be in the same groups as user 'pi'
# (assuming we run on a raspberry pi).
#
# More specifically, we need to be in groups:
#
# tty
# input
#
# Check /etc/group for details
$dir/rss.pl -ticker </dev/tty1 >/dev/tty1 &