Update doinst.sh template.
This commit is contained in:
parent
a5e1bec617
commit
e46e538801
1 changed files with 10 additions and 9 deletions
|
@ -29,16 +29,16 @@ install_file() {
|
|||
}
|
||||
|
||||
# Install new configuration files.
|
||||
install_file "FIXME/FIXME.new"
|
||||
install_file "EDITME/EDITME.new"
|
||||
|
||||
# List info pages in the directory.
|
||||
[[ -x usr/bin/install-info ]] && usr/bin/install-info %BUILD_PREFIX%/info/FIXME.info.gz %BUILD_PREFIX%/info/dir
|
||||
[[ -x usr/bin/install-info ]] && usr/bin/install-info %BUILD_PREFIX%/info/EDITME.info.gz %BUILD_PREFIX%/info/dir
|
||||
|
||||
# Add required user/group.
|
||||
GROUPNAME="FIXME"
|
||||
GROUPID="FIXME"
|
||||
USERNAME="FIXME"
|
||||
USERID="FIXME"
|
||||
GROUPNAME="EDITME"
|
||||
GROUPID="EDITME"
|
||||
USERNAME="EDITME"
|
||||
USERID="EDITME"
|
||||
grep "^$GROUPNAME:" etc/group >/dev/null 2>&1 || {
|
||||
if chroot . usr/sbin/groupadd -g "$GROUPID" -r "$GROUPNAME" && chroot . usr/sbin/grpconv; then
|
||||
echo "NOTICE: Added new system group: $GROUPNAME ($GROUPID)."
|
||||
|
@ -48,7 +48,7 @@ grep "^$GROUPNAME:" etc/group >/dev/null 2>&1 || {
|
|||
echo
|
||||
}
|
||||
grep "^$USERNAME:" etc/passwd >/dev/null 2>&1 || {
|
||||
if chroot . usr/sbin/useradd -d "FIXME_HOMEDIR" -g "$GROUPNAME" -M -N -r -s /bin/false -u "$USERID" "$USERNAME" && chroot . usr/sbin/pwconv; then
|
||||
if chroot . usr/sbin/useradd -d "EDITME_HOMEDIR" -g "$GROUPNAME" -M -N -r -s /bin/false -u "$USERID" "$USERNAME" && chroot . usr/sbin/pwconv; then
|
||||
echo "NOTICE: Added new system user: $USERNAME ($USERID)"
|
||||
else
|
||||
echo "WARNING: Failed to add required user: $USERNAME."
|
||||
|
@ -57,7 +57,7 @@ grep "^$USERNAME:" etc/passwd >/dev/null 2>&1 || {
|
|||
}
|
||||
|
||||
# Add service start to rc.local
|
||||
RC="rc.FIXME"
|
||||
RC="rc.EDITME"
|
||||
fgrep "/etc/rc.d/$RC" etc/rc.d/rc.local >/dev/null 2>&1 || {
|
||||
echo >>etc/rc.d/rc.local
|
||||
echo "[[ -x /etc/rc.d/$RC ]] /etc/rc.d/$RC start" >>etc/rc.d/rc.local
|
||||
|
@ -74,4 +74,5 @@ fgrep "/etc/rc.d/$RC" etc/rc.d/rc.local_shutdown >/dev/null 2>&1 || {
|
|||
echo "[[ -x /etc/rc.d/$RC ]] && /etc/rc.d/$RC stop" >>etc/rc.d/rc.local_shutdown
|
||||
}
|
||||
|
||||
restart cron if a crontab was installed
|
||||
# Restart crond if a new crontab was installed
|
||||
[[ -x /etc/rc.d/rc.crond ]] && /etc/rc.d/rc.crond restart
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue