Revision 22685,
515 bytes
checked in by ghudson, 17 years ago
(diff) |
* debathena/config: Snapshot config package sources from
/mit/debathena/packages/config.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[22685] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | get_user () |
---|
| 4 | { |
---|
| 5 | OPTS=$(getopt -q -o 'db:' --long "database:" -- "$@") || return 1 |
---|
| 6 | eval set -- "$OPTS" |
---|
| 7 | while true; do |
---|
| 8 | case "$1" in |
---|
| 9 | --) shift; break;; |
---|
| 10 | *) shift;; |
---|
| 11 | esac |
---|
| 12 | done |
---|
| 13 | if [ -n "$1" ]; then |
---|
| 14 | echo "$1" |
---|
| 15 | else |
---|
| 16 | id -un |
---|
| 17 | fi |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | if ! user=$(get_user "$@") || |
---|
| 21 | grep -q "^$user:" /etc/passwd || |
---|
| 22 | ! (echo c; echo qy gpob "$user") | mrtest -q | grep -q '1 tuple'; then |
---|
| 23 | exec "$(dirname "$0")/chfn.debathena-orig" "$@" |
---|
| 24 | else |
---|
| 25 | exec "$(dirname "$0")/chfn.moira" "$@" |
---|
| 26 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.