3 # (c) Thomas Lange, 2001-2017, lange@debian.org
5 error
=0; trap 'error=$(($?>$error?$?:$error))' ERR
# save maximum error code
8 fcopy
-M /etc
/X11
/xorg.conf
11 if ifclass UBUNTU
; then
12 groups
="adm cdrom sudo dip plugdev lpadmin sambashare"
13 $ROOTCMD addgroup
--system lpadmin || true
14 $ROOTCMD addgroup
--system sambashare || true
17 # add additional user account
18 if [ -n "$username" ]; then
19 if ! $ROOTCMD getent passwd
$username ; then
20 $ROOTCMD adduser
--disabled-login --gecos "$username user" $username
21 $ROOTCMD usermod
-p "$USERPW" $username
22 userdir
=$
($ROOTCMD getent passwd
"$username" | cut
-d: -f6 )
24 # disable xfce question about default or empty panel
25 if [ -f $target/etc
/xdg
/xfce
4/panel
/default.xml
]; then
26 xfdir
=$userdir/.config
/xfce
4/xfconf
/xfce-perchannel-xml
27 if [ ! -d $target/$xfdir ]; then
28 $ROOTCMD mkdir
-p $xfdir
29 $ROOTCMD cp /etc
/xdg
/xfce
4/panel
/default.xml
$xfdir/xfce4-panel.xml
30 # group name is the same as user name
31 $ROOTCMD chown
-R $username.
$username $userdir/.config
36 $ROOTCMD adduser
$username $g