Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 239487 Details for
Bug 328111
Cleanup retired people from groups on cvs.gentoo.org
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script to look for retired devs on local groups
search-retired-devs.sh (text/plain), 1.16 KB, created by
Jorge Manuel B. S. Vicetto
on 2010-07-20 02:41:10 UTC
(
hide
)
Description:
Script to look for retired devs on local groups
Filename:
MIME Type:
Creator:
Jorge Manuel B. S. Vicetto
Created:
2010-07-20 02:41:10 UTC
Size:
1.16 KB
patch
obsolete
>#!/bin/bash ># Jorge Manuel B. S. Vicetto ># 2010-07-19 > ># FILES >GROUPS_LIST="/etc/group" >DEVS="devs.txt" >RETIRED_DEVS="retired-devs.txt" > ># List of retired devs >ldapsearch '(&(gentooStatus=retired)(!(gentooAccess=infra-system.group)))' -Z uid -LLL -S uid | \ > awk '/^uid:/{print $2}' > ${RETIRED_DEVS} > ># List of devs in groups >cat /etc/group | cut -d : -f 4 | sed -e "/^$/d" | tr , '\n' | sort -u | sed -e "/^XXX/d" \ > -e "/adm/d" -e "/bin/d" -e "/lp/d" -e "/root/d" -e "/uucp/d" -e "/games/d" -e "/gcfengine/d" \ > -e "/gcvsd-rsync/d" -e "/gmanual/d" -e "/gmirror/d" -e "/gweb/d" -e "/man/d" -e "/news/d" \ > -e "/portage/d" -e "/postfix/d" -e "/smmsp/d" > ${DEVS} > > ># List of devs to process >PROCESS_DEVS="" > ># check for each dev in a group if he/she is retired >print_dev() { > > local dev="${1}" > > local groups=$(grep ${dev} ${GROUPS_LIST} | cut -d : -f 1 | tr '\n' ' ') > echo "The retired dev ${dev} is on the ${groups}groups" >} > ># get list of retired devs in the groups >get_retired_devs() { > > PROCESS_DEVS=$(comm -12 ${DEVS} ${RETIRED_DEVS}) >} > >get_retired_devs > >if [[ -n ${PROCES_DEVS} ]] ; then > echo ${PROCESS_DEVS} | tr ' ' '\n' | while read dev; do > print_dev ${dev} > done >fi >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 328111
: 239487