я бы попробовал добавить в начало скрипта (ниже shebang-а, конечно)
set -v
с большой вероятностью (уточнить можно с помощью "man sh") используемый shell поймёт эту команду как руководство выводить в stdout все исполняемые команды·
и, возможно, эта информация попадёт к вам на терминал, и/или будет записана в какой-нибудь log-файл·
там во многих местах расставлены exit-ы при неудачном выполнении команд, поэтому по логу можно будет понять, какая из команд выдала ошибку при выполнении·
NIS - то может быть и не нужен, но без него ни как. если из скрипта убрать строчку
/usr/bin/ypwhich > /dev/null 2>&1
то основной скрипт ругается на измененный объем preinstall скрипта. Поэтому нашел как настраивается служба NIS:
Task 1 – Setting Up the NIS Master
Complete the following steps:
1. Change the directory to /var/yp, and make a backup copy of the Makefile file.
# cd /var/yp
# cp Makefile Makefile.orig
2. In the /var/yp/Makefile, remove the aliases entry from the target all.
3. Verify that the /etc/hosts file contains entries for the systems that will become the NIS slave server and the NIS client.
4. Select a name to use as your NIS domain name. Set it by using the domainname command.
# domainname yourdomain
Note – Replace yourdomain with your chosen domain name.
5. Populate the defaultdomain file with your domain name.
# cd /etc
# domainname > defaultdomain
6. Use the touch command to create the ethers, bootparams, and netgroup files in the /etc directory.
# cd /etc ; touch ethers bootparams netgroup
7. Create the /etc/timezone file, and include an appropriate entry for your time zone and NIS domain. For example, the following entry would set the time zone for systems located within an NIS domain called yourdomain.
your_timezone
yourdomain
Note – Replace your_timezone time zone with your local time zone and yourdomain with your own domain name. To see an example of a time zone entry, cat the /etc/TIMEZONE file.
# cat /etc/timezone
US/Mountain
suned.sun.com
8. Copy the /etc/nsswitch.nis template to the /etc/nsswitch.conf file.
# cd /etc ; cp nsswitch.nis nsswitch.conf
9. Set up this system as an NIS master server:
a. Use the ypinit -m command to start the setup process.
# ypinit -m
The ypinit command lists the current system as an NIS server, and then prompts you for the next host to add as an NIS slave server.
b. Enter the name of the system that you want to use as an NIS slave server. Press Control-D when the list is complete.
next host to add: master_server
next host to add: slave_server
next host to add: <Control–D>
(list of servers)
is this list correct? [y/n: y] y
c. Specify that you do not want the ypinit command to quit on nonfatal errors.
...quit on nonfatal errors? [y/n: n] n
The ypinit command then proceeds to build the required maps.
Note – If the initialization process is successful, the ypinit command displays a message indicating that the current system was set up as a master server without any errors. This message is displayed even if nonfatal errors occur in the procedure.
d. If the initialization process fails, correct the problems indicated by the error messages and repeat Steps a, b, and c.
10. Verify the status of the NIS server daemon.
# svcs -a | grep nis | grep server
online 1:54:32 svc:/network/nis/server:default
11. Start the NIS server daemon if it is not running.
# svcadm enable network/nis/server:default
12. Verify that this system is the NIS master by using the ypwhich command.
# ypwhich -m
Task 2 – Setting Up the NIS Client
Complete the following steps:
1. Verify that the /etc/hosts file contains entries for the NIS master and slave servers.
2. Set the NIS domain for this system using the domainname command.
# domainname yourdomain
Note – Replace yourdomain with the NIS domain name you used to set up the NIS master server.
3. Populate the defaultdomain file with your domain name.
# cd /etc
# domainname > defaultdomain
4. Set up this system as an NIS client:
a. Use the ypinit -c command to start the setup process.
b. Enter the name of the NIS master server and the NIS slave server (in order of preference), and press Control-D to terminate the list.
# ypinit -c
next host to add: master_server
next host to add: slave_server
next host to add: <Control–D>
(list of servers)
is this list correct? [y/n: y] y
5. Copy the /etc/nsswitch.nis template to the /etc/nsswitch.conf file.
# cd /etc
# cp nsswitch.nis nsswitch.conf
6. Verify the status of the NIS client daemon.
# svcs -a | grep nis | grep client
disabled 18:55:45 svc:/network/nis/client:default
7. Start the NIS client daemon.
# svcadm enable network/nis/client:default
8. Verify that this system is using NIS by using the ypwhich command.
# ypwhich -m
Task 3 – Testing Dynamic Rebind
Complete the following steps:
1. Confirm that the NIS client is bound to the NIS master server by using the ypwhich command.
# ypwhich
master_server
Маломайски все поставил. Теперь разбираюсь как подключиться к удаленному десктопу (или десктопу зоны).