#!/bin/sh -e
#===============================================================================
#
#          FILE:  xietong-custom-apply
# 
#         USAGE:  ./xietong-custom-apply
# 
#   DESCRIPTION:  
# 
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: bqin (), bqin@linx-info.com
#       COMPANY: linx-info
#       CREATED: 2013年10月16日 15时05分03秒 CST
#      REVISION:  ---
#===============================================================================

. /usr/share/debconf/confmodule

db_get xietong-custom/user_name
USERNAME="$RET"
db_get xietong-custom/user_home
USERHOME="$RET"
db_get xietong-custom/user_shell
USERSHELL="$RET"
echo USERNAME:$USERNAME 
echo USERHOME:$USERHOME
echo USERSHELL:$USERSHELL


cp -r /usr/lib/xietong-custom-udeb/setup.xietong /target/tmp
mount /proc /target/proc
chroot /target ./tmp/setup.xietong/setup.sh $USERNAME $USERHOME $USERSHELL
chroot /target xdg-user-dirs-update
umount /target/proc

