在安装系统结束后,对/etc/和/usr/share/config/两个目录分别做git库
进行管理(bug1941) new file: operation/finish_install/99create_git_manage.sh new file: operation/finish_install/cfg_create_git.sh Signed-off-by: Wei,Shuai <swei@linx-info.com>
This commit is contained in:
25
operation/finish_install/99create_git_manage.sh
Executable file
25
operation/finish_install/99create_git_manage.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: create_git_manage.sh
|
||||
#
|
||||
# USAGE: ./create_git_manage.sh
|
||||
#
|
||||
# DESCRIPTION: create git of /etc and /usr/share/config
|
||||
#
|
||||
# OPTIONS: ---
|
||||
# REQUIREMENTS: ---
|
||||
# BUGS: ---
|
||||
# NOTES: ---
|
||||
# AUTHOR: Wei Shuai , swei@linx-info.com
|
||||
# COMPANY: linx-info
|
||||
# COPYRIGHT: Copyright 2001-2014 Linx Technology Co.,Ltd.
|
||||
# CREATED: 2014年08月08日 13时50分49秒 CST
|
||||
# REVISION: ---
|
||||
#===============================================================================
|
||||
|
||||
source ./functions
|
||||
cp /usr/lib/new_install/operation/finish_install/cfg_create_git.sh $TARGET/
|
||||
chmod +x $TARGET/cfg_create_git.sh
|
||||
chroot $TARGET /cfg_create_git.sh
|
||||
rm $TARGET/cfg_create_git.sh
|
||||
33
operation/finish_install/cfg_create_git.sh
Normal file
33
operation/finish_install/cfg_create_git.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: cfg_create_git.sh
|
||||
#
|
||||
# USAGE: ./cfg_create_git.sh
|
||||
#
|
||||
# DESCRIPTION: create git of /etc and /usr/share/config
|
||||
#
|
||||
# OPTIONS: ---
|
||||
# REQUIREMENTS: ---
|
||||
# BUGS: ---
|
||||
# NOTES: ---
|
||||
# AUTHOR: Wei Shuai , swei@linx-info.com
|
||||
# COMPANY: linx-info
|
||||
# COPYRIGHT: Copyright 2001-2014 Linx Technology Co.,Ltd.
|
||||
# CREATED: 2014年08月08日 13时50分49秒 CST
|
||||
# REVISION: ---
|
||||
#===============================================================================
|
||||
|
||||
#create git of /etc
|
||||
cd /etc
|
||||
git init-db
|
||||
git config --global "user.name" "sysadmin"
|
||||
git add .
|
||||
git commit -m "git manage of /etc/ init..." 1>/dev/null
|
||||
|
||||
#create git of /usr/share/config
|
||||
cd /usr/share/config/
|
||||
git init-db
|
||||
git config --global "user.name" "sysadmin"
|
||||
git add .
|
||||
git commit -m "git manage of /usr/share/config/ init..." 1>/dev/null
|
||||
Reference in New Issue
Block a user