| | 260 | |
|---|
| | 261 | # Description: update system and user skels |
|---|
| | 262 | # Depends: dpsyco-skel |
|---|
| | 263 | # |
|---|
| | 264 | dpsyco () { |
|---|
| | 265 | |
|---|
| | 266 | user=$1 |
|---|
| | 267 | if nullstr $user; then warning "No username given"; return; fi |
|---|
| | 268 | |
|---|
| | 269 | # Configure dpsyco users |
|---|
| | 270 | cfg=/etc/dpsyco/adduser.conf |
|---|
| | 271 | if ! exists $cfg; then warning $cfg not found; return; fi |
|---|
| | 272 | key="UID_MATCH" |
|---|
| | 273 | sep="=" |
|---|
| | 274 | val="1000" |
|---|
| | 275 | add_key "$key" "$sep" "$cfg" |
|---|
| | 276 | set_key "$key" "$sep" "$val" "$cfg" |
|---|
| | 277 | |
|---|
| | 278 | update-dpsyco-users-skel |
|---|
| | 279 | # update-dpsyco-skel |
|---|
| | 280 | |
|---|
| | 281 | # Hack to workaround dpsyco's ownership bug |
|---|
| | 282 | if grep -q $user /etc/passwd; then |
|---|
| | 283 | for i in $(find /usr/share/dpsyco/userskel/ |cut -f 6- -d /); do |
|---|
| | 284 | chown $user /home/$user/$i; |
|---|
| | 285 | done |
|---|
| | 286 | fi |
|---|
| | 287 | } |
|---|