在 Solaris 软件包中添加用户许可协议
我对 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经找到解决方法了。
自解压二进制文件就是实现这一点的方法。
创建一个 shell 脚本,该脚本将首先显示最终用户许可证并接受用户输入,无论用户是否同意。
一旦用户同意,提取嵌入 shell 脚本的二进制文件(solaris 软件包文件)并安装它。
要嵌入安装程序包,首先添加一个标记,比如 PKG_DATA:
附加包文件:
cat pkg_file_name>> your_shell_script
解压包并安装:
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:
Append the package file:
cat pkg_file_name >> your_shell_script
Extract the package and install it:
我将使用 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