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_ae=!volumedown
|
||||||
KEYBOARD_KEY_b0=!volumeup
|
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
|
# Fix for volume keys on Lenovo Yoga S940
|
||||||
# For 10th gen it should be pn81Q8 instead of pn81Q7 but
|
# For 10th gen it should be pn81Q8 instead of pn81Q7 but
|
||||||
# I don't have a device to test
|
# 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:*
|
sensor:modalias:acpi:KIOX000A*:dmi:bvnINSYDECorp.:bvrVISION.I22K*:svnKAZAM:pnVISION:*
|
||||||
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
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
|
# Lamina
|
||||||
#########################################
|
#########################################
|
||||||
@ -537,16 +531,6 @@ sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80XE:*
|
|||||||
sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80U1:*
|
sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80U1:*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
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
|
# LINX
|
||||||
#########################################
|
#########################################
|
||||||
|
|||||||
@ -2,34 +2,27 @@
|
|||||||
|
|
||||||
import ast
|
import ast
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
|
|
||||||
def read_os_release():
|
def read_os_release():
|
||||||
try:
|
try:
|
||||||
filename = '/etc/os-release'
|
f = open('/etc/os-release')
|
||||||
f = open(filename)
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
filename = '/usr/lib/os-release'
|
f = open('/usr/lib/os-release')
|
||||||
f = open(filename)
|
|
||||||
|
|
||||||
for line_number, line in enumerate(f):
|
for line_number, line in enumerate(f):
|
||||||
line = line.rstrip()
|
if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*?)\s*$', line):
|
||||||
if not line or line.startswith('#'):
|
|
||||||
continue
|
|
||||||
if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line):
|
|
||||||
name, val = m.groups()
|
name, val = m.groups()
|
||||||
if val and val[0] in '"\'':
|
if val and val[0] in '"\'':
|
||||||
val = ast.literal_eval(val)
|
val = ast.literal_eval(val)
|
||||||
yield name, val
|
yield name, val
|
||||||
else:
|
else:
|
||||||
print(f'{filename}:{line_number + 1}: bad line {line!r}',
|
print(f'Warning: bad line {line_number}: {line}', file=sys.stderr)
|
||||||
file=sys.stderr)
|
|
||||||
|
|
||||||
os_release = dict(read_os_release())
|
os_release = dict(read_os_release())
|
||||||
|
|
||||||
pretty_name = os_release.get('PRETTY_NAME', 'Linux')
|
pretty_name = os_release.get('PRETTY_NAME', 'Linux')
|
||||||
print(f'Running on {pretty_name}')
|
print(f'Running on {pretty_name}')
|
||||||
|
|
||||||
if 'debian' in [os_release.get('ID', 'linux'),
|
if (os_release.get('ID', 'linux') == 'debian' or
|
||||||
*os_release.get('ID_LIKE', '').split()]:
|
os_release.get('ID_LIKE', None) == 'debian'):
|
||||||
print('Looks like 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}"
|
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!"
|
echo "Looks like Debian!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user