The invention relates to a method for installing various installation sources automatically by installer, which includes the following steps: S1: start the installer, scan the specified installation source directory and get the file name of the installation source; S2: use the Linux command \file\ to detect the file type; S3: automatically determine the type of installation source according to the corresponding relationship between file type and installation mode; S4: according to the security. The type of installation source automatically parses the installation source and starts the installation program. The installation program provided by the invention can automatically install various installation sources. Through the function of the installation program to automatically identify the installation source, the installation images of different installation sources can be quickly made on the basis of using the same installation program. It avoids repeatedly modifying the installation program and transferring parameters to the installation program, optimizes the steps of making Linux Installation disk, and saves time.
【技术实现步骤摘要】
一种安装程序自动安装多种安装源的方法
本专利技术涉及计算机软件程序安装
,具体涉及一种安装程序自动安装多种安装源的方法。
技术介绍
当前许多安装程序都仅仅对某一种安装源提供了比较完善的解决方案。而在不同的安装源之间,还无法通用同一个安装程序,导致部署起来也不方便,易用性差。目前linux安装程序常见的安装源有LiveCD、rpm包、系统压缩包等。更换不同的安装源,都需要对安装程序做调整,或修改配置文件,或修改内核参数,从而使安装程序直接获取到当前的安装源类型,然后根据不同的安装源类型解析安装源文件并开始安装。因此,现有的安装程序的安装方式确有改善的必要。
技术实现思路
为解决现有技术存在的不足,本专利技术提供了一种安装程序自动安装多种安装源的方法,包括如下步骤:S1:安装程序启动,扫描指定的安装源目录,得到安装源的文件名称;S2:使用linux命令“file”检测文件类型;S3:根据文件类型与安装方式之间的对应关系自动判断出安装源的类型;S4:根据安装源的类型自动解析安装源并开始安装程序。其中,所述步骤S3中,squashfsfilesystem文件类型的数据的解析,通过调用LiveCD安装方式中解析squashfs的接口实现。其中,所述步骤S3中,RPM文件类型的数据的解析,通过调用rpm包安装方式中解析rpm的接口实现。其中,所述步骤S3中,gzipcompresseddata文件类型的数据的解析,通过调用压缩包安装方式中的解析tar.gz的接口实现。本专利技术中,所谓的“安装程序”,是指为了将系统光盘文件安装到计算机硬盘对应目录下的程序。本专利技术 ...
【技术保护点】
1.一种安装程序自动安装多种安装源的方法,其特征在于,包括如下步骤:S1:安装程序启动,扫描指定的安装源目录,得到安装源的文件名称;S2:使用linux命令“file”检测文件类型;S3:根据文件类型与安装方式之间的对应关系自动判断出安装源的类型;S4:根据安装源的类型自动解析安装源并开始安装程序。
【技术特征摘要】
1.一种安装程序自动安装多种安装源的方法,其特征在于,包括如下步骤:S1:安装程序启动,扫描指定的安装源目录,得到安装源的文件名称;S2:使用linux命令“file”检测文件类型;S3:根据文件类型与安装方式之间的对应关系自动判断出安装源的类型;S4:根据安装源的类型自动解析安装源并开始安装程序。2.如权利要求1所述的安装程序自动安装多种安装源的方法,其特征在于,所述步骤S3中,squashfsfilesystem文件类型的数据的解析,通过调用LiveCD安装方式中解析squashfs的接口实现。3.如权利要求1或2所述的安...
【专利技术属性】
技术研发人员:王二生,朱健伟,何曌君,韩正赟,申利飞,
申请(专利权)人:中标软件有限公司,
类型:发明
国别省市:上海,31
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。