mirror of
https://github.com/systemd/systemd
synced 2026-03-16 18:14:46 +01:00
Compare commits
No commits in common. "986cdba9f8a38178611b006341951d5a017d69c9" and "83a04afc06eb37e765e23a3af4333f681619794e" have entirely different histories.
986cdba9f8
...
83a04afc06
@ -878,10 +878,6 @@ evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:*
|
||||
KEYBOARD_KEY_ae=!volumedown
|
||||
KEYBOARD_KEY_b0=!volumeup
|
||||
|
||||
evdev:atkbd:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:*
|
||||
KEYBOARD_KEY_62=unknown # Touchpad on, also emitted by "Ideapad extra buttons", ignore
|
||||
KEYBOARD_KEY_63=unknown # Touchpad off, also emitted by "Ideapad extra buttons", ignore
|
||||
|
||||
# Fix for volume keys on Lenovo Yoga S940
|
||||
# For 10th gen it should be pn81Q8 instead of pn81Q7 but
|
||||
# I don't have a device to test
|
||||
|
||||
@ -477,12 +477,6 @@ sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:*:svnjumper:pnEZpad
|
||||
sensor:modalias:acpi:KIOX000A*:dmi:bvnINSYDECorp.:bvrVISION.I22K*:svnKAZAM:pnVISION:*
|
||||
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
||||
|
||||
#########################################
|
||||
# KD / Kurio
|
||||
#########################################
|
||||
sensor:modalias:acpi:SMO8500*:dmi:*:svnKDInteractive:pnKurioSmart:*:rnKDM960BCP:*
|
||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||
|
||||
#########################################
|
||||
# Lamina
|
||||
#########################################
|
||||
@ -537,16 +531,6 @@ sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80XE:*
|
||||
sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80U1:*
|
||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||
|
||||
# Yoga 300-11IBR, display sensor
|
||||
sensor:modalias:acpi:DUAL250E*:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:*
|
||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||
ACCEL_LOCATION=display
|
||||
|
||||
# Yoga 300-11IBR, base sensor
|
||||
sensor:modalias:i2c:bmc150_accel:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:*
|
||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, -1
|
||||
ACCEL_LOCATION=base
|
||||
|
||||
#########################################
|
||||
# LINX
|
||||
#########################################
|
||||
|
||||
@ -2,34 +2,27 @@
|
||||
|
||||
import ast
|
||||
import re
|
||||
import sys
|
||||
|
||||
def read_os_release():
|
||||
try:
|
||||
filename = '/etc/os-release'
|
||||
f = open(filename)
|
||||
f = open('/etc/os-release')
|
||||
except FileNotFoundError:
|
||||
filename = '/usr/lib/os-release'
|
||||
f = open(filename)
|
||||
f = open('/usr/lib/os-release')
|
||||
|
||||
for line_number, line in enumerate(f):
|
||||
line = line.rstrip()
|
||||
if not line or line.startswith('#'):
|
||||
continue
|
||||
if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line):
|
||||
if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*?)\s*$', line):
|
||||
name, val = m.groups()
|
||||
if val and val[0] in '"\'':
|
||||
val = ast.literal_eval(val)
|
||||
yield name, val
|
||||
else:
|
||||
print(f'{filename}:{line_number + 1}: bad line {line!r}',
|
||||
file=sys.stderr)
|
||||
print(f'Warning: bad line {line_number}: {line}', file=sys.stderr)
|
||||
|
||||
os_release = dict(read_os_release())
|
||||
|
||||
pretty_name = os_release.get('PRETTY_NAME', 'Linux')
|
||||
print(f'Running on {pretty_name}')
|
||||
|
||||
if 'debian' in [os_release.get('ID', 'linux'),
|
||||
*os_release.get('ID_LIKE', '').split()]:
|
||||
if (os_release.get('ID', 'linux') == 'debian' or
|
||||
os_release.get('ID_LIKE', None) == 'debian'):
|
||||
print('Looks like Debian!')
|
||||
|
||||
@ -5,6 +5,6 @@ test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/
|
||||
|
||||
echo "Running on ${PRETTY_NAME:-Linux}"
|
||||
|
||||
if [ "${ID:-linux}" = "debian" ] || [ "${ID_LIKE#*debian*}" != "${ID_LIKE}" ]; then
|
||||
if [ "${ID:-linux}" = "debian" ] || [ "${ID_LIKE:-}" = "debian" ]; then
|
||||
echo "Looks like Debian!"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user