Commit 0af35eb5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add users scripts

parent 05f43574
#!/bin/bash
/bin/rm -f /home/*/.xsession-errors*
\ No newline at end of file
#!/bin/sh
[ -n "$1" ] || exit
if [ "$2" = "warn" ] ; then
setquota -u $1 -a 4000000 18000000 0 0
exit
fi
if [ "$2" = "ext" ] ; then
setquota -u $1 -a 15000000 18000000 0 0
else
setquota -u $1 -a 5000000 7000000 0 0
fi
#!/bin/sh
# Создаёт /srv/USER для пользователя и направляет туда Projects
USER=$1
test -n "$USER" || exit
test -d "/home/$USER/" || exit
test -d "/srv/$USER/" && exit
mkdir -p /srv/$USER/Projects || exit
chown -R $USER /srv/$USER
test -L /home/$USER/Projects && exit
ln -s /srv/$USER/Projects /home/$USER/Projects
#!/bin/sh
for i in /home/* ; do
echo $i
U=$(basename $i)
[ -r $i/.rpmmacros ] || continue
if grep -q homedir/RPM $i/.rpmmacros ; then
subst "s|^%_topdir.*%homedir/RPM|%_topdir %_tmppath/RPM|g" $i/.rpmmacros || continue
subst "s|^%_tmppath.*%homedir/tmp|%_tmppath /tmp/.private/$U|g" $i/.rpmmacros || continue
fi
rm -f $i/RPM
test -d $i/RPM && continue
ln -s /tmp/.private/$U/RPM $i/RPM
#ln -s /tmp/.private/$U $i/RPM/tmp
done
#!/bin/sh
for i in /home/* ; do
echo $i
if [ -r $i/.Xkbmap ] ; then
if ! cat $i/.Xkbmap | grep -q typo ; then
echo "-option lv3:lwin_switch,misc:typo" >> $i/.Xkbmap
fi
else
cat >$i/.Xkbmap <<EOF
-layout us,ru(winkeys)
-option
-option grp:ctrl_shift_toggle
-option grp_led:scroll
-option lv3:lwin_switch,misc:typo
EOF
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment