Operating System - HP-UX
1827211 Members
2248 Online
109716 Solutions
New Discussion

Re: nohup makes make_sys_image fail on rp3440/HP-UX11i v2

 
SOLVED
Go to solution
newa
Frequent Advisor

nohup makes make_sys_image fail on rp3440/HP-UX11i v2

Hi,

I just noticed an intresting thing about make_sys_image - everytime I used it with nohup it would get stopped somehow like the following (running it in the foreground without nohup worked very well.)

Do you know why?

Thanks a lot in advance!

######### running with nohup fails #########
/roothome # nohup /tmp/make_sys_image -d /san02 -s 172.20.123.224 > make_sys_image.log 2>&1 &
[1] 6731
uguth462:/roothome #
[1] + Stopped (SIGTTIN) nohup /tmp/make_sys_image -d /san02 -s 172.20.123.224 > make_sys_image.log 2>&1 &

/roothome # cat make_sys_image.log
* Preparing to create a system archive.
* Testing for necessary pax patch.
* Passed pax tests.

WARNING: CLEAN_LEVEL set to 2: (see -l option for make_sys_image(1M))
While this command is executing at clean level 2, the system
should be as quiet as possible. The host and/or networking
information on the system are temporarily set to newconfig
values. After the command is complete these files are
returned to their previous state.

Creating keepsafe archive with file /stand/system
Creating your system file in the file /var/tmp/make_sys_image.hwsys.a12980
Appending file /.profile to keepsafe archive
.Appending file /etc/rc.config.d/hpfcmsconf to keepsafe archive
.Appending file /etc/rc.config.d/netconf to keepsafe archive
.Appending file /etc/rc.config.d/netdaemons to keepsafe archive
.Appending file /etc/rc.config.d/namesvrs to keepsafe archive
.Appending file /etc/rc.config.d/mailservs to keepsafe archive
.Appending file /etc/rc.config.d/xfs to keepsafe archive
.Appending file /etc/hosts to keepsafe archive
.Appending file /etc/group to keepsafe archive
.Appending file /etc/mail/sendmail.cw to keepsafe archive
.Appending file /etc/netgroup to keepsafe archive
.Appending file /etc/ntp.conf to keepsafe archive
.Appending file /etc/vue/config/Xsession.d/0070.recs to keepsafe archive
.Appending file /var/adm/sw/security/_ACL to keepsafe archive
.Appending file /var/adm/sw/security/_OWNER to keepsafe archive
.Appending file /var/adm/sw/security/_PROD_DFLT_ACL to keepsafe archive
.Appending file /var/adm/sw/security/_SOC_DFLT_ACL to keepsafe archive
.Appending file /var/adm/sw/security/secrets to keepsafe archive
.Appending file /var/adm/sw/security/secrets.pag to keepsafe archive
Appending file /var/adm/sw/security/secrets.dir to keepsafe archive


######### running without nohup works ########
/roothome # /tmp/make_sys_image -d /san02 -s 172.20.123.224
* Preparing to create a system archive.
* Testing for necessary pax patch.
* Passed pax tests.

WARNING: CLEAN_LEVEL set to 2: (see -l option for make_sys_image(1M))
While this command is executing at clean level 2, the system
should be as quiet as possible. The host and/or networking
information on the system are temporarily set to newconfig
values. After the command is complete these files are
returned to their previous state.

Creating keepsafe archive with file /stand/system
Creating your system file in the file /var/tmp/make_sys_image.hwsys.a12980
Appending file /.profile to keepsafe archive
.Appending file /etc/rc.config.d/hpfcmsconf to keepsafe archive
.Appending file /etc/rc.config.d/netconf to keepsafe archive
.Appending file /etc/rc.config.d/netdaemons to keepsafe archive
.Appending file /etc/rc.config.d/namesvrs to keepsafe archive
.Appending file /etc/rc.config.d/mailservs to keepsafe archive
.Appending file /etc/rc.config.d/xfs to keepsafe archive
.Appending file /etc/hosts to keepsafe archive
.Appending file /etc/group to keepsafe archive
.Appending file /etc/mail/sendmail.cw to keepsafe archive
.Appending file /etc/netgroup to keepsafe archive
.Appending file /etc/ntp.conf to keepsafe archive
.Appending file /etc/vue/config/Xsession.d/0070.recs to keepsafe archive
.Appending file /var/adm/sw/security/_ACL to keepsafe archive
.Appending file /var/adm/sw/security/_OWNER to keepsafe archive
.Appending file /var/adm/sw/security/_PROD_DFLT_ACL to keepsafe archive
.Appending file /var/adm/sw/security/_SOC_DFLT_ACL to keepsafe archive
.Appending file /var/adm/sw/security/secrets to keepsafe archive
.Appending file /var/adm/sw/security/secrets.pag to keepsafe archive
Appending file /var/adm/sw/security/secrets.dir to keepsafe archive

* Archiving contents of dev462 via tar to
172.20.123.224:/san02/dev462.gz.
* Creation of system archive complete.
* Clean up: Do not interrupt; restoring files, kernel, and transition
links.

/roothome #
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: nohup makes make_sys_image fail on rp3440/HP-UX11i v2

>[1] + Stopped (SIGTTIN) nohup /tmp/make_sys_image -d /san02 -s 172.20.123.224 > make_sys_image.log 2>&1 &

It is possible between the two steps the shell is trying to do tty stuff.
You should redirect stdin also:
nohup /tmp/make_sys_image ... < /dev/null
Raj D.
Honored Contributor

Re: nohup makes make_sys_image fail on rp3440/HP-UX11i v2

newa,

You can perhaps do it in two step as below:

1. Put the command in a file.
2. make it executable.
3. Run the file with nohup.



# vi sys_img.sh
/tmp/make_sys_image -d /san02 -s 172.20.123.224 > make_sys_image.log 2>&1


# chmod +x sys_img.sh
# nohup sys_img.sh &


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
newa
Frequent Advisor

Re: nohup makes make_sys_image fail on rp3440/HP-UX11i v2

Dennis' solution worked. Thanks a lot, Dennis