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 links in /dev in absence of e?(u|s?m)dev.
|
|
|
|
# Run this _after_ miscfs.
|
|
|
|
|
|
|
|
service_type='oneshot'
|
|
|
|
|
|
|
|
# Config
|
|
|
|
cfg_links=(
|
|
|
|
'/proc/self/fd;/dev/fd'
|
|
|
|
)
|
|
|
|
|
|
|
|
start() {
|
|
|
|
for l in "${cfg_links[@]}"; do
|
|
|
|
IFS=';' read dest link <<< "$l"
|
|
|
|
|
|
|
|
[[ -e "$link" ]] || {
|
|
|
|
[[ -e "$dest" ]] && {
|
|
|
|
ln -s "$dest" "$link"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
done
|
|
|
|
}
|