おいとめさんのリクエストに答えて・・・
*MG5200シリーズ用Patch
対象は、cnijfilter-mg5200series-3.40-1-debです。
mg5200.dif
コード: 全て選択
*** org_install.sh 2014-05-08 21:25:30.990439058 +0900
--- install.sh 2014-05-08 21:39:02.234454288 +0900
***************
*** 739,745 ****
P_printer_sudo_command=""
P_entry_list_path=${P_entry_list_path_rpm}${P_entry_list_dir}
else
! P_printer_sudo_command="sudo "
P_entry_list_path=${P_entry_list_path_deb}${P_entry_list_dir}
fi
--- 739,745 ----
P_printer_sudo_command=""
P_entry_list_path=${P_entry_list_path_rpm}${P_entry_list_dir}
else
! P_printer_sudo_command=""
P_entry_list_path=${P_entry_list_path_deb}${P_entry_list_dir}
fi
***************
*** 1052,1058 ****
if [ "$2" = "rpm" ]; then
P_printer_sudo_command=""
else
! P_printer_sudo_command="sudo "
fi
--- 1052,1058 ----
if [ "$2" = "rpm" ]; then
P_printer_sudo_command=""
else
! P_printer_sudo_command=""
fi
***************
*** 1245,1256 ****
local c_system_deb=""
## Judge is the distribution supporting rpm? ##
! rpm --version 1> /dev/null 2>&1
! c_system_rpm=$?
## Judge is the distribution supporting dpkg(debian)? ##
! dpkg --version 1> /dev/null 2>&1
! c_system_deb=$?
## rpm and deb are error, or rpm and deb are no error, is error ##
if [ $c_system_rpm = 0 -a $c_system_deb = 0 ] || [ $c_system_rpm != 0 -a $c_system_deb != 0 ]; then
--- 1245,1256 ----
local c_system_deb=""
## Judge is the distribution supporting rpm? ##
! #rpm --version 1> /dev/null 2>&1
! c_system_rpm=1
## Judge is the distribution supporting dpkg(debian)? ##
! #dpkg --version 1> /dev/null 2>&1
! c_system_deb=0
## rpm and deb are error, or rpm and deb are no error, is error ##
if [ $c_system_rpm = 0 -a $c_system_deb = 0 ] || [ $c_system_rpm != 0 -a $c_system_deb != 0 ]; then
***************
*** 1278,1284 ****
local c_arg1=$1
if [ $C_system = "deb" ]; then
! c_sudo_command="sudo "
fi
getconf LONG_BIT 1> /dev/null 2>&1
--- 1278,1284 ----
local c_arg1=$1
if [ $C_system = "deb" ]; then
! c_sudo_command=""
fi
getconf LONG_BIT 1> /dev/null 2>&1
***************
*** 1547,1553 ****
local c_fpath_pkg_name=$1
## result -> 0:Install process complete, 1:Install process depend error ##
! C_FUNC_show_and_exec "sudo dpkg -iG $c_fpath_pkg_name"
if [ $? != 0 ]; then
return $C_ERR_CODE
fi
--- 1547,1553 ----
local c_fpath_pkg_name=$1
## result -> 0:Install process complete, 1:Install process depend error ##
! C_FUNC_show_and_exec "petget +$c_fpath_pkg_name"
if [ $? != 0 ]; then
return $C_ERR_CODE
fi
***************
*** 1632,1647 ****
fi
else
C_install_process="C_FUNC_deb_install_process"
! C_uninstall_command="sudo dpkg -P"
C_script_path=$C_config_path_deb
! C_sudo_command="sudo"
fi
## Common-Package install process ##
$C_install_process $C_fpath_common $C_main_module-$C_common
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command $C_pkgname_common"
fi
exit
fi
--- 1632,1647 ----
fi
else
C_install_process="C_FUNC_deb_install_process"
! C_uninstall_command="petget"
C_script_path=$C_config_path_deb
! C_sudo_command=""
fi
## Common-Package install process ##
$C_install_process $C_fpath_common $C_main_module-$C_common
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command -$C_pkgname_common"
fi
exit
fi
***************
*** 1650,1658 ****
$C_install_process $C_fpath_depend $C_main_module-$C_device
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command $C_pkgname_depend"
fi
! C_FUNC_show_and_exec "$C_uninstall_command $C_pkgname_common"
exit
fi
--- 1650,1658 ----
$C_install_process $C_fpath_depend $C_main_module-$C_device
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command -$C_pkgname_depend"
fi
! C_FUNC_show_and_exec "$C_uninstall_command -$C_pkgname_common"
exit
fi
***************
*** 1737,1743 ****
C_FUNC_deb_uninstall_process()
{
# uninstall #
! C_FUNC_show_and_exec "sudo dpkg -P $1"
## result -> 0:Uninstall complete, 1:Uninstall error by debendency ##
if [ $? -ne 0 ]; then
# Dependency error #
--- 1737,1743 ----
C_FUNC_deb_uninstall_process()
{
# uninstall #
! C_FUNC_show_and_exec "petget -$1"
## result -> 0:Uninstall complete, 1:Uninstall error by debendency ##
if [ $? -ne 0 ]; then
# Dependency error #
***************
*** 1758,1764 ****
fi
else
C_uninstall_process="C_FUNC_deb_uninstall_process"
! C_sudo_command="sudo"
fi
$C_function02 "$C_device" "$C_system"
--- 1758,1764 ----
fi
else
C_uninstall_process="C_FUNC_deb_uninstall_process"
! C_sudo_command=""
fi
$C_function02 "$C_device" "$C_system"
*MG4100シリーズ用Patch
対象は、cnijfilter-mg4100series-3.60-1-debです。
mg4100.dif
コード: 全て選択
*** org_install.sh 2012-11-02 17:44:16.083238000 +0900
--- install.sh 2014-05-08 21:56:52.666474384 +0900
***************
*** 772,778 ****
P_printer_sudo_command=""
P_entry_list_path=${P_entry_list_path_rpm}${P_entry_list_dir}
else
! P_printer_sudo_command="sudo "
P_entry_list_path=${P_entry_list_path_deb}${P_entry_list_dir}
fi
--- 772,778 ----
P_printer_sudo_command=""
P_entry_list_path=${P_entry_list_path_rpm}${P_entry_list_dir}
else
! P_printer_sudo_command=""
P_entry_list_path=${P_entry_list_path_deb}${P_entry_list_dir}
fi
***************
*** 1087,1093 ****
if [ "$2" = "rpm" ]; then
P_printer_sudo_command=""
else
! P_printer_sudo_command="sudo "
fi
--- 1087,1093 ----
if [ "$2" = "rpm" ]; then
P_printer_sudo_command=""
else
! P_printer_sudo_command=""
fi
***************
*** 1280,1291 ****
local c_system_deb=""
## Judge is the distribution supporting rpm? ##
! rpm --version 1> /dev/null 2>&1
! c_system_rpm=$?
## Judge is the distribution supporting dpkg(debian)? ##
! dpkg --version 1> /dev/null 2>&1
! c_system_deb=$?
## rpm and deb are error, or rpm and deb are no error, is error ##
if [ $c_system_rpm = 0 -a $c_system_deb = 0 ] || [ $c_system_rpm != 0 -a $c_system_deb != 0 ]; then
--- 1280,1291 ----
local c_system_deb=""
## Judge is the distribution supporting rpm? ##
! #rpm --version 1> /dev/null 2>&1
! c_system_rpm=1
## Judge is the distribution supporting dpkg(debian)? ##
! #dpkg --version 1> /dev/null 2>&1
! c_system_deb=0
## rpm and deb are error, or rpm and deb are no error, is error ##
if [ $c_system_rpm = 0 -a $c_system_deb = 0 ] || [ $c_system_rpm != 0 -a $c_system_deb != 0 ]; then
***************
*** 1312,1318 ****
local c_arg1=$1
if [ $C_system = "deb" ]; then
! c_sudo_command="sudo "
fi
getconf LONG_BIT 1> /dev/null 2>&1
--- 1312,1318 ----
local c_arg1=$1
if [ $C_system = "deb" ]; then
! c_sudo_command=""
fi
getconf LONG_BIT 1> /dev/null 2>&1
***************
*** 1444,1450 ****
exit
fi
else
! sudo echo > /dev/null
if [ $? -ne 0 ]; then
exit
fi
--- 1444,1450 ----
exit
fi
else
! echo > /dev/null
if [ $? -ne 0 ]; then
exit
fi
***************
*** 1597,1603 ****
local c_fpath_pkg_name=$1
## result -> 0:Install process complete, 1:Install process depend error ##
! C_FUNC_show_and_exec "sudo dpkg -iG $c_fpath_pkg_name"
if [ $? != 0 ]; then
return $C_ERR_CODE
fi
--- 1597,1603 ----
local c_fpath_pkg_name=$1
## result -> 0:Install process complete, 1:Install process depend error ##
! C_FUNC_show_and_exec "petget +$c_fpath_pkg_name"
if [ $? != 0 ]; then
return $C_ERR_CODE
fi
***************
*** 1676,1691 ****
C_sudo_command=""
else
C_install_process="C_FUNC_deb_install_process"
! C_uninstall_command="sudo dpkg -P"
C_script_path=$C_config_path_deb
! C_sudo_command="sudo"
fi
## Common-Package install process ##
$C_install_process $C_fpath_common $C_main_module-$C_common
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command $C_pkgname_common"
fi
exit
fi
--- 1676,1691 ----
C_sudo_command=""
else
C_install_process="C_FUNC_deb_install_process"
! C_uninstall_command="petget"
C_script_path=$C_config_path_deb
! C_sudo_command=""
fi
## Common-Package install process ##
$C_install_process $C_fpath_common $C_main_module-$C_common
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command -$C_pkgname_common"
fi
exit
fi
***************
*** 1694,1702 ****
$C_install_process $C_fpath_depend $C_main_module-$C_device
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command $C_pkgname_depend"
fi
! C_FUNC_show_and_exec "$C_uninstall_command $C_pkgname_common"
exit
fi
--- 1694,1702 ----
$C_install_process $C_fpath_depend $C_main_module-$C_device
if [ $? -ne 0 ]; then
if [ $C_system = "deb" ]; then
! C_FUNC_show_and_exec "$C_uninstall_command -$C_pkgname_depend"
fi
! C_FUNC_show_and_exec "$C_uninstall_command -$C_pkgname_common"
exit
fi
***************
*** 1782,1788 ****
C_FUNC_deb_uninstall_process()
{
# uninstall #
! C_FUNC_show_and_exec "sudo dpkg -P $1"
## result -> 0:Uninstall complete, 1:Uninstall error by debendency ##
if [ $? -ne 0 ]; then
# Dependency error #
--- 1782,1788 ----
C_FUNC_deb_uninstall_process()
{
# uninstall #
! C_FUNC_show_and_exec "petget -$1"
## result -> 0:Uninstall complete, 1:Uninstall error by debendency ##
if [ $? -ne 0 ]; then
# Dependency error #
***************
*** 1803,1811 ****
fi
else
C_uninstall_process="C_FUNC_deb_uninstall_process"
! C_sudo_command="sudo"
! sudo echo > /dev/null
if [ $? -ne 0 ]; then
exit
fi
--- 1803,1811 ----
fi
else
C_uninstall_process="C_FUNC_deb_uninstall_process"
! C_sudo_command=""
! echo > /dev/null
if [ $? -ne 0 ]; then
exit
fi
なお、mg4100.difは、MG4130で動作確認をしております。