File: sdm

package info (click to toggle)
sdm 0.4.0a-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 188 kB
  • ctags: 4
  • sloc: sh: 68; makefile: 66
file content (37 lines) | stat: -rwxr-xr-x 740 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
#!/bin/ash
#/usr/sbin/sdm

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

# this can be run from /etc/inittab, like so:
# sdm:5:respawn:/usr/sbin/sdm

# set path to be sure we have xinit
PATH=/usr/local/sbin:/usr/bin/X11/:/usr/X11R6/bin/:$PATH

if [ -x /usr/sbin/sdm-login ]; then
	sdmlogin=/usr/sbin/sdm-login
fi
if [ -x /usr/local/sbin/sdm-login ]; then
	sdmlogin=/usr/local/sbin/sdm-login
fi

. /etc/sdm/sdm.config

if [ -z "$xserver" ]; then
	xserver="/usr/bin/X11/X"
fi

for a in $@; do
  case $1 in
    --xserver) xserver="$2" 
    shift ;;
    *) args="$args $1" ;;
  esac
  if [ -n "$1" ]; then
    shift
  fi
done

exec xinit $sdmlogin -- $xserver $args