👤
Home Man
Search
Today's Posts
Register

The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Automating old Boot Environment Cleanup Solaris 11

Tags
solved

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 11-02-2017
Wrench Automating old Boot Environment Cleanup Solaris 11

I'm trying to automate the patching process using scripts and cronjobs in Solaris 11.

one of the things I'd like to do is cleanup the old boot environments.

unfortunately

Code:
beadm destroy

requires a response

Code:
:~$ pfexec beadm destroy -f solaris-13
Are you sure you want to destroy solaris-13?  This action cannot be undone(y/[n]):

I've checked the man pages and even with a -f/F it still requires a response.

Anyone got any handy ideas on how to deal with the programmatically?

thanks

Jim
# 2  
Old 11-02-2017
If a single prompt is issued, or if there are several prompts and they all require a "y" response, you can invoke it in a pipeline reading output from the yes utility.
The Following User Says Thank You to Don Cragun For This Useful Post:
os2mac (11-02-2017)
# 3  
Old 11-02-2017
Quote:
Originally Posted by Don Cragun
If a single prompt is issued, or if there are several prompts and they all require a "y" response, you can invoke it in a pipeline reading output from the yes utility.
so I tried the obvious
Code:
:~$ pfexec beadm destroy -f solaris-13|yes

but that did not appear to work.

can you give an example of correct usage?

thanks I've never heard of yes before.
# 4  
Old 11-02-2017
As Don Cragun is offline, may I jump in? Reverse the pipe commands' sequence:
Code:
yes | pfexec beadm destroy -f solaris-13

The Following 2 Users Say Thank You to RudiC For This Useful Post:
Don Cragun (11-02-2017), os2mac (11-02-2017)
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Lucreate Fails to Create Boot Environment; zbest1966 UNIX for Beginners Questions & Answers 0 12-21-2017 12:32 AM
Restoring to previous Boot Environment polo_mint4 Solaris 5 07-29-2011 05:27 AM
Solaris live upgrade on Active boot environment Mr_Webster Solaris 4 12-05-2009 04:26 AM
Messed up my boot environment or root profile Garball UNIX for Dummies Questions & Answers 3 10-01-2009 09:13 PM
Adding to boot-up environment DreamWarrior UNIX for Dummies Questions & Answers 1 07-13-2004 12:33 PM
automating CDE X applications from boot pkruse UNIX for Dummies Questions & Answers 1 06-27-2003 05:24 PM
automating CDE X applications from boot pkruse UNIX for Advanced & Expert Users 5 06-27-2003 11:19 AM


All times are GMT -4. The time now is 02:28 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password