# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name adduser version 0.1 categories test description test tcl extensions fetch {} checksum {} extract {} use_configure no build {} destroot {} set usr postgres set grp postgres post-destroot { # Check if the user and group already exist and replace them? set uid [existsuser ${usr}] set gid [existsgroup ${grp}] ui_msg "${uid}:${gid}" if {!${uid}} { ui_msg "Creating user:\t ${usr}" } else { ui_msg "User ${usr} exists,\t uid=${uid}" } if {!${gid}} { ui_msg "Creating group:\t ${grp}" } else { ui_msg "Group ${grp} exists,\t gid=${gid}" } }