ssm-services/init.d/devfs-permissions

19 lines
377 B
Plaintext
Raw Normal View History

2014-07-21 04:54:56 +00:00
#!/usr/bin/env watchman
2014-07-20 20:24:01 +00:00
# This is a script to set up the right permissions in /dev in absence of e?(u|s?m)dev.
# Run this _after_ miscfs.
2014-07-20 20:24:01 +00:00
service_type='oneshot'
2014-07-27 22:09:11 +00:00
# Config moved to conf.d
2014-07-20 20:24:01 +00:00
spawn() {
2014-07-20 20:24:01 +00:00
for d in "${cfg_devices[@]}"; do
IFS=';' read device owner perms <<< "$d"
[[ -e "$device" ]] && {
chown -R "$owner" "$device"
chmod -R "$perms" "$device"
}
done
}