File: undock.sh

package info (click to toggle)
acpi-support 0.143-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 828 kB
  • sloc: sh: 816; ansic: 131; makefile: 38
file content (10 lines) | stat: -rw-r--r-- 234 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

test -f /usr/share/acpi-support/key-constants || exit 0

for device in /sys/devices/platform/dock.*; do
	[ -e "$device/type" ] || continue
	read dt <$dt
	[ "$dt" = dock_station ] || continue
	echo 1 > "$device/undock"
done