在 Solaris 软件包中添加用户许可协议

发布于 2024-08-23 16:57:16 字数 965 浏览 12 评论 0原文

我对 Linux RPM 提出了类似的问题(在 RPM 包中添加许可协议) 。现在我对 Solaris 软件包有相同的查询。如果可能的话,我无法获得任何有用的链接/详细信息。但我发现了一个包,它的功能完全相同,但它是如何实现的,但没有提及。

$pkgadd -d . SUNWsamfsr SUNWsamfsu

Processing package instance from 

Sun SAM and Sun SAM-QFS software Solaris 10 (root)(i386) 4.6.5,REV=5.10.2007.03.12

Sun SAMFS - Storage & Archiving Management File System

Copyright (c) 2007 Sun Microsystems, Inc.

All Rights Reserved.


----------------------------------------------------- 

In order to install SUNWsamfsr, you must accept the terms of
the Sun License Agreement.
Enter "y" if you do, "n" if you don't, or "v" to view agreement. y

-The administrator commands will be executable by root only (group bin).

If this is the desired value, enter "y". If you want to change 
the specified value enter "c". y   
...   
...

有什么想法如何为 Solaris 包实现这样的事情吗?

I have asked similar question for Linux RPM (Adding License Agreement in RPM package). Now i have same query for Solaris package. I could not get any helpful link / details if it is possible. But I have found a package which does exactly the same thing but how it has been implemented, its not mentioned.

$pkgadd -d . SUNWsamfsr SUNWsamfsu

Processing package instance from 

Sun SAM and Sun SAM-QFS software Solaris 10 (root)(i386) 4.6.5,REV=5.10.2007.03.12

Sun SAMFS - Storage & Archiving Management File System

Copyright (c) 2007 Sun Microsystems, Inc.

All Rights Reserved.


----------------------------------------------------- 

In order to install SUNWsamfsr, you must accept the terms of
the Sun License Agreement.
Enter "y" if you do, "n" if you don't, or "v" to view agreement. y

-The administrator commands will be executable by root only (group bin).

If this is the desired value, enter "y". If you want to change 
the specified value enter "c". y   
...   
...

Any ideas how to implement such thing for Solaris package?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风吹雨成花 2024-08-30 16:57:16

我已经找到解决方法了。

自解压二进制文件就是实现这一点的方法。

创建一个 shell 脚本,该脚本将首先显示最终用户许可证并接受用户输入,无论用户是否同意。

一旦用户同意,提取嵌入 shell 脚本的二进制文件(solaris 软件包文件)并安装它。

要嵌入安装程序包,首先添加一个标记,比如 PKG_DATA:

shell script contents
exit 0   
PKG_DATA   

附加包文件:
cat pkg_file_name>> your_shell_script

解压包并安装:

ARCHIVE=awk '/^__PKG_DATA__/ {print NR + 1; exit 0; }' $0   
outname=install.$   
tail -n+$ARCHIVE $0 > $outname   

echo "Extracting..."   
pkgadd -d $outname   
rm -f $outname #we dont need it anymore   

exit 0   

PKG_DATA   
<pkg file data here>   

I have found a way to solve it.

The self-extracting binary is the way to do it.

Create a shell script which will first dipslay the end user license and take user input whether user agrees or not.

Once user agrees, extract the binary (solaris package file) embed in the shell script and install it.

To embed installer pacakge, first add a marker lets say PKG_DATA:

shell script contents
exit 0   
PKG_DATA   

Append the package file:
cat pkg_file_name >> your_shell_script

Extract the package and install it:

ARCHIVE=awk '/^__PKG_DATA__/ {print NR + 1; exit 0; }' $0   
outname=install.$   
tail -n+$ARCHIVE $0 > $outname   

echo "Extracting..."   
pkgadd -d $outname   
rm -f $outname #we dont need it anymore   

exit 0   

PKG_DATA   
<pkg file data here>   
他夏了夏天 2024-08-30 16:57:16

我将使用 checkinstall 脚本来实现它。

该脚本中的“exit 3”优雅地结束了软件包安装。

这并不是一件小事,因为您需要创建一个请求脚本并在 checkinstall 脚本中引用它。

http://docs.oracle。 com/cd/E18752_01/html/817-0406/ch1designpkg-24309.html#ch1designpkg-4

I would implement that using the checkinstall script.

"exit 3" in that script gracefully ends the package installation.

That's not trivial as you need to create a request script and reference it in the checkinstall one.

http://docs.oracle.com/cd/E18752_01/html/817-0406/ch1designpkg-24309.html#ch1designpkg-4

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文