Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../.././../lib/svc/method/domain
Real path: /lib/svc/method/domain
Zurück
#!/bin/ksh # # Copyright (c) 2004, 2022, Oracle and/or its affiliates. # . /lib/svc/share/smf_include.sh YPDIR=/usr/lib/netsvc/yp warn() { echo "WARNING: $SMF_FMRI $@" >& 2 } # Initialize NIS domainame from SMF configuration case "$1" in 'start') # The Solaris version of this file does an import of # of the name service configuration before the export # below. The appliance delivers an empty # /etc/defaultdomain. This causes the import to fail # which in turn causes the start method to fail. To # cope we remove the import step entirely which is # fine on the appliance since all service modifications # must be made through SMF. # if [[ $(getconf _SC_SUNW_FEATURE_AK) == 1 ]]; then /usr/sbin/nscfg export $SMF_FMRI err=$? if [ $err -eq 1 ] ; then warn "configuration export error." exit $SMF_EXIT_ERR_CONFIG fi else if is_self_assembly_boot; then # Only import on first boot after # install/upgrade. /usr/sbin/nscfg import -q $SMF_FMRI err=$? if [ $err -eq 1 ] ; then warn "configuration import error." exit $SMF_EXIT_ERR_CONFIG elif [ $err -eq 3 ] ; then warn "no configuration." exit $SMF_EXIT_ERR_CONFIG fi fi # Only export if allowed. if [[ -w /etc ]]; then /usr/sbin/nscfg export $SMF_FMRI err=$? if [ $err -eq 1 ] ; then warn "configuration export error." exit $SMF_EXIT_ERR_CONFIG fi fi fi DOMAIN=$(svcprop -p config/domainname $SMF_FMRI) # svcprop adds quotes and we need to remove those /usr/bin/domainname -t "$(eval echo "$DOMAIN")" ;; 'refresh') # When we can't write the configuration file, we want # an error. /usr/sbin/nscfg export $SMF_FMRI err=$? if [ $err -eq 2 ] ; then exit $SMF_EXIT_OK elif [ $err -ne 0 ] ; then echo "Unable to create NIS configuration" >& 2 exit $SMF_EXIT_ERR_CONFIG fi DOMAIN=$(svcprop -p config/domainname $SMF_FMRI) /usr/bin/domainname -t "$(eval echo "$DOMAIN")" ;; 'stop') ;; 'unconfigure') domain=$(domainname) # Permanently shutdown service svcadm disable $SMF_FMRI # Unroll any admin customization svccfg -s svc:/network/nis/domain delcust if [ $? -ne 0 ]; then echo "Failed to unroll administrative customizations for $SMF_FMRI" exit $SMF_EXIT_ERR_FATAL fi svcadm refresh $SMF_FMRI if [ -n "$domain" ]; then rm -rf /var/yp/binding/$domain fi rm -f /etc/defaultdomain /usr/bin/domainname "" ;; esac exit $SMF_EXIT_OK