Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
85602e1a
Commit
85602e1a
authored
Feb 20, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tune_new_user.sh: fill .rpmmacros
parent
8df70959
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
tune_new_user.sh
etersoft/tune_new_user.sh
+22
-3
No files found.
etersoft/tune_new_user.sh
View file @
85602e1a
#!/bin/sh
# user setup
CONSOLEFONT
=
"Droid Sans Mono 11"
#NU="$1"
NU
=
"
$USER
"
DOMAIN
=
"etersoft.ru"
CONSOLEFONT
=
"Droid Sans Mono 11"
[
-n
"
$NU
"
]
||
exit
# skip for these users
...
...
@@ -16,10 +17,28 @@ case "$NU" in
esac
NAME
=
"
$(
getent passwd
"
$NU
"
|
cut
-d
":"
-f5
)
"
[
-n
"
$NAME
"
]
||
exit
LATNAME
=
"
$NAME
"
EMAIL
=
"
$NU
@
$DOMAIN
"
# TODO: revert and get latin name from git's user.name ?
# TODO: other source?
# set git
git config
--global
user.name
"
$NAME
"
git config
--global
user.email
"
$NU
@
$DOMAIN
"
git config
--global
user.name
"
$LATNAME
"
git config
--global
user.email
"
$EMAIL
"
if
grep
-q
"^#%packager"
~/.rpmmacros
;
then
cat
<<
EOF
>~/.rpmmacros
%_tmppath /tmp/.private/
$NU
%_topdir %_tmppath/RPM
%packager "
$LATNAME
" <
$EMAIL
>
%_gpg_name %packager
EOF
fi
# fix ssh config
if
[
!
-s
~/.ssh/config
]
||
!
grep
"^Host
\*
"
~/.ssh/config
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment