Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| tr:docs:guide-user:advanced:opkg_extras [2021/12/23 04:48] – [Uygulama] sorcun | tr:docs:guide-user:advanced:opkg_extras [2023/08/18 07:09] – [Otomatik] use wget stokito | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | ||
| + | ====== Opkg ekleri ====== | ||
| + | {{section> | ||
| + | |||
| + | ===== Önsöz ===== | ||
| + | * Bu yönerge [[tr: | ||
| + | * Hızlı kurulum için [[tr: | ||
| + | |||
| + | ===== Vasıflar ===== | ||
| + | * Opkg profilleri kaydetme, geri yükleme, ve geri alma | ||
| + | * Otomatik ve özel prfil desteği. | ||
| + | * RWM, overlay ve extroot paketleri desteği. | ||
| + | * Kullanıcının kaldırdığı/ | ||
| + | * Bellenim yükseltme sonrası otomatik yükleme. | ||
| + | * Yükseltilebilir tüm paketleri yükseltme. | ||
| + | * Yeni yapılandırmalar bulma. | ||
| + | |||
| + | ===== Uygulama ===== | ||
| + | * Opkg çağrılarını pürüzsüz çağrı yöntemi sağlamak üzere sarmalama. | ||
| + | * Profilleri depolamak ve yönetmek için [[tr: | ||
| + | * Paket tiplerini [[man> | ||
| + | * [[https:// | ||
| + | * WAN bağlanabilirliğinin tespiti ve profil geri-yüklemenin tetiklenmesi için Use [[tr: | ||
| + | * Döngülerden ve mücadele durumlarından sakınmak için [[https:// | ||
| + | * Otomatik profil geri-yükleme sonrası değişiklikleri uygulamak için [[man> | ||
| + | * Sorun-giderme için etkileşimsiz günlükleri [[tr: | ||
| + | * El ile özelleştirilmediyse, | ||
| + | * Profilleri geri-yüklerken paket çatışmalarından sakınmak için kaldırmayı yüklemeden üstün kılar. | ||
| + | * İşlem sahasını zaman kazanmak için sınırlandırır: | ||
| + | * Paketleri, kaynak tüketimini olabildiğince azaltmak ve aktarma hatasından sakınmak için birer birer işler. | ||
| + | |||
| + | ===== Komutlar ===== | ||
| + | ^ Alt-komut ^ Tanım ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | ===== Direktifler ===== | ||
| + | Takip eden kodu kopyalayım SSH veya uçbirim üzerinde kullanın. | ||
| + | <code bash> | ||
| + | # Configure profile | ||
| + | mkdir -p / | ||
| + | cat << " | ||
| + | opkg() { | ||
| + | local OPKG_CMD=" | ||
| + | local OPKG_UCI=" | ||
| + | case " | ||
| + | (init|uci|import|save|restore|rollback\ | ||
| + | |upgr|export|newconf|proc|reinstall) opkg_" | ||
| + | (*) command opkg " | ||
| + | esac | ||
| + | } | ||
| + | |||
| + | opkg_init() { | ||
| + | uci import opkg < /dev/null | ||
| + | uci -q batch << EOI | ||
| + | set opkg.defaults=' | ||
| + | set opkg.defaults.import='/ | ||
| + | set opkg.defaults.save=' | ||
| + | set opkg.defaults.restore=' | ||
| + | set opkg.defaults.rollback=' | ||
| + | set opkg.defaults.upgr=' | ||
| + | set opkg.defaults.export=' | ||
| + | set opkg.defaults.proc=' | ||
| + | set opkg.defaults.reinstall=' | ||
| + | set opkg.defaults.newconf='/ | ||
| + | EOI | ||
| + | } | ||
| + | |||
| + | opkg_uci() { | ||
| + | local OPKG_OPT=" | ||
| + | local OPKG_OPT=" | ||
| + | if ! uci -q get opkg > /dev/null | ||
| + | then opkg init | ||
| + | fi | ||
| + | uci -q batch << EOI | ||
| + | delete opkg.' | ||
| + | set opkg.' | ||
| + | $(sed -r -e " | ||
| + | del_list opkg.' | ||
| + | add_list opkg.' | ||
| + | commit opkg | ||
| + | EOI | ||
| + | } | ||
| + | |||
| + | opkg_import() { | ||
| + | local OPKG_OPT=" | ||
| + | if [ -e " | ||
| + | then sed -n -r -e " | ||
| + | \tipkg/ | ||
| + | | opkg uci auto | ||
| + | fi | ||
| + | } | ||
| + | |||
| + | opkg_save() { | ||
| + | local OPKG_OPT=" | ||
| + | local OPKG_WR=" | ||
| + | local OPKG_WI=" | ||
| + | local OPKG_UR=" | ||
| + | local OPKG_UI=" | ||
| + | if uci -q get fstab.rwm > /dev/null \ | ||
| + | && grep -q -e " | ||
| + | then { | ||
| + | sed -e " | ||
| + | sed -e " | ||
| + | } | opkg uci init | ||
| + | fi | ||
| + | { | ||
| + | sed -e " | ||
| + | sed -e " | ||
| + | } | opkg uci " | ||
| + | rm -f " | ||
| + | } | ||
| + | |||
| + | opkg_restore() { | ||
| + | local OPKG_OPT=" | ||
| + | local OPKG_CONF=" | ||
| + | local OPKG_AI=" | ||
| + | local OPKG_PR=" | ||
| + | local OPKG_PI=" | ||
| + | grep -x -f " | ||
| + | | opkg proc remove | ||
| + | grep -v -x -f " | ||
| + | | opkg proc install | ||
| + | rm -f " | ||
| + | } | ||
| + | |||
| + | opkg_rollback() { | ||
| + | local OPKG_OPT=" | ||
| + | local OPKG_CONF=" | ||
| + | local OPKG_UR=" | ||
| + | local OPKG_UI=" | ||
| + | local OPKG_PR=" | ||
| + | local OPKG_PI=" | ||
| + | if uci -q get opkg." | ||
| + | then opkg restore " | ||
| + | grep -v -x -f " | ||
| + | | opkg proc remove | ||
| + | grep -v -x -f " | ||
| + | | opkg proc install | ||
| + | fi | ||
| + | rm -f " | ||
| + | } | ||
| + | |||
| + | opkg_upgr() { | ||
| + | local OPKG_OPT=" | ||
| + | case " | ||
| + | (ai|oi) opkg_" | ||
| + | esac | opkg proc upgrade | ||
| + | } | ||
| + | |||
| + | opkg_upgr_type() { | ||
| + | local OPKG_AI=" | ||
| + | local OPKG_OI=" | ||
| + | local OPKG_AU=" | ||
| + | case " | ||
| + | (a) grep -x -f " | ||
| + | (o) grep -x -f " | ||
| + | esac | ||
| + | rm -f " | ||
| + | } | ||
| + | |||
| + | opkg_export() { | ||
| + | local OPKG_OPT=" | ||
| + | local OPKG_TEMP=" | ||
| + | case " | ||
| + | (ai|au) opkg_" | ||
| + | (ri|wr|wi|or|oi) opkg_" | ||
| + | (ur|ui) opkg_" | ||
| + | (pr|pi) opkg_" | ||
| + | esac > " | ||
| + | echo " | ||
| + | } | ||
| + | |||
| + | opkg_export_cmd() { | ||
| + | local OPKG_TYPE | ||
| + | case " | ||
| + | (i) OPKG_TYPE=" | ||
| + | (u) OPKG_TYPE=" | ||
| + | esac | ||
| + | opkg list-" | ||
| + | | sed -e " | ||
| + | } | ||
| + | |||
| + | opkg_export_type() { | ||
| + | local OPKG_INFO="/ | ||
| + | local OPKG_TYPE | ||
| + | case " | ||
| + | (r) OPKG_INFO="/ | ||
| + | (w) OPKG_INFO="/ | ||
| + | (o) OPKG_INFO="/ | ||
| + | esac | ||
| + | case " | ||
| + | (r) OPKG_TYPE=" | ||
| + | (i) OPKG_TYPE=" | ||
| + | esac | ||
| + | find " | ||
| + | -type " | ||
| + | | sed -e " | ||
| + | } | ||
| + | |||
| + | opkg_export_run() { | ||
| + | local OPKG_AI=" | ||
| + | local OPKG_RI=" | ||
| + | case " | ||
| + | (r) grep -v -x -f " | ||
| + | (i) grep -v -x -f " | ||
| + | esac | ||
| + | rm -f " | ||
| + | } | ||
| + | |||
| + | opkg_export_uci() { | ||
| + | local OPKG_TYPE | ||
| + | case " | ||
| + | (r) OPKG_TYPE=" | ||
| + | (i) OPKG_TYPE=" | ||
| + | esac | ||
| + | uci -q get opkg." | ||
| + | | sed -e " | ||
| + | } | ||
| + | |||
| + | opkg_proc() { | ||
| + | local OPKG_OPT=" | ||
| + | local OPKG_CMD=" | ||
| + | local OPKG_PKG | ||
| + | while read -r OPKG_PKG | ||
| + | do opkg " | ||
| + | done | ||
| + | } | ||
| + | |||
| + | opkg_reinstall() { | ||
| + | local OPKG_OPT=" | ||
| + | opkg install " | ||
| + | } | ||
| + | |||
| + | opkg_newconf() { | ||
| + | local OPKG_OPT=" | ||
| + | find " | ||
| + | } | ||
| + | EOF | ||
| + | . / | ||
| + | |||
| + | # Configure hotplug | ||
| + | mkdir -p / | ||
| + | cat << " | ||
| + | OPKG_CONF=" | ||
| + | for OPKG_CONF in ${OPKG_CONF} | ||
| + | do if [ ! -e / | ||
| + | && lock -n / | ||
| + | && opkg update | ||
| + | then . / | ||
| + | opkg restore " | ||
| + | | logger -t opkg | ||
| + | touch / | ||
| + | lock -u / | ||
| + | reboot | ||
| + | break | ||
| + | fi | ||
| + | done | ||
| + | EOF | ||
| + | cat << " | ||
| + | / | ||
| + | EOF | ||
| + | </ | ||
| + | |||
| + | ===== Örnekler ===== | ||
| + | <code bash> | ||
| + | # Save Opkg profile | ||
| + | opkg save | ||
| + | |||
| + | # Restore Opkg profile | ||
| + | opkg update | ||
| + | opkg restore | ||
| + | |||
| + | # Roll back Opkg profile | ||
| + | opkg rollback | ||
| + | |||
| + | # Set up a custom Opkg profile | ||
| + | uci set opkg.defaults.restore=" | ||
| + | uci set opkg.custom=" | ||
| + | uci add_list opkg.custom.rpkg=" | ||
| + | uci add_list opkg.custom.rpkg=" | ||
| + | uci add_list opkg.custom.ipkg=" | ||
| + | uci add_list opkg.custom.ipkg=" | ||
| + | uci add_list opkg.custom.ipkg=" | ||
| + | uci commit opkg | ||
| + | |||
| + | # Check Opkg log | ||
| + | logread -e opkg | ||
| + | |||
| + | # Upgrade packages | ||
| + | opkg update | ||
| + | opkg upgr | ||
| + | </ | ||
| + | |||
| + | ===== Otomatik ===== | ||
| + | <code bash> | ||
| + | wget -O opkg-extras.sh " | ||
| + | . ./ | ||
| + | </ | ||
| + | |||
| + | ===== Ayrıca Bakınız ===== | ||
| + | Gözetimli sistem yükseltme: '' | ||