You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
465 B
24 lines
465 B
3 years ago
|
#!/bin/sh
|
||
|
# issue welcome message if there's a guest user
|
||
|
# (the first one configured with empty password)
|
||
|
|
||
|
[ -n "$GLOBAL_USERS" ] || {
|
||
|
echo "** 50-issue: warning, no users created" >&1
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
guest=
|
||
|
for u in $GLOBAL_USERS; do
|
||
|
login="${u%%:*}"
|
||
|
[ -n "$login" ] || continue
|
||
|
rest="${u#*:}"
|
||
|
pass="${rest%%:*}"
|
||
|
[ -z "$pass" ] || continue
|
||
|
guest="$login"
|
||
|
break
|
||
|
done
|
||
|
|
||
|
[ -n "$guest" ] || exit 0
|
||
|
|
||
|
echo "Hello friend, say \`$guest' to log in at \\l" >> /etc/issue
|