This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip addr add 172.24.4.229/28 dev br-ex | |
iptables -t nat -I POSTROUTING 1 -s 172.24.4.224/28 -j MASQUERADE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@aopcach ~]# ll /sys/block/ | |
total 0 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:37 dm-0 -> ../devices/virtual/block/dm-0 | |
lrwxrwxrwx 1 root root 0 Jun 17 12:37 dm-1 -> ../devices/virtual/block/dm-1 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:37 dm-2 -> ../devices/virtual/block/dm-2 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:40 dm-3 -> ../devices/virtual/block/dm-3 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:37 loop0 -> ../devices/virtual/block/loop0 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:40 loop1 -> ../devices/virtual/block/loop1 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:40 loop2 -> ../devices/virtual/block/loop2 | |
lrwxrwxrwx 1 root root 0 Jun 17 10:40 loop3 -> ../devices/virtual/block/loop3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. use dmesg to find out the device: | |
[ 987.836474] iwl3945 0000:0c:00.0: firmware: agent aborted loading iwlwifi-3945-2.ucode (not found?) | |
[ 987.844596] iwl3945 0000:0c:00.0: firmware: agent aborted loading iwlwifi-3945-1.ucode (not found?) | |
[ 987.844755] iwl3945 0000:0c:00.0: Could not read microcode: -2 | |
2. add non-fee repo: | |
# head /etc/apt/sources.list | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from gi.repository import PackageKitGlib | |
# this fails in install_packages(), as the Epson archive is not actually signed | |
#repo = 'deb http://download.ebz.epson.net/dsc/op/stable/debian lsb3.2 main' | |
#repo_gpg_id = '8AA65D56' | |
#package = 'epson-inkjet-printer-px-402a' | |
# this works |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = PackageKitGlib.Client() | |
print 'refreshing cache' | |
client.refresh_cache(False, None, lambda p, t, d: True, None) | |
print 'cache refreshing done' | |
print 'getting updates' | |
res = client.get_updates(PackageKitGlib.FilterEnum.NONE, None, lambda p, t, d: True, None) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnf install @development-tools fedora-packager rpmdevtools git vim wget | |
yum makecache fast | |
yum update -y && yum install wget -y | |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && yum install epel-release-latest-7.noarch.rpm -y | |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && yum install epel-release-latest-6.noarch.rpm -y | |
yum install -y python2 python-devel python-twisted-core python-twisted-web python-twisted-words python-configobj python-psutil libxml2-python python-simplejson rpm-python python-crypto python-httplib2 shadow-utils python-pip pygobject3 PolicyKit PackageKit dbus-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from commands import getstatusoutput | |
retcode, systemd_system_unit_dir = getstatusoutput('pkg-config systemd --variable=systemdsystemunitdir') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
# Copyright (C) 2012 Juan Carlos Moreno <juancarlos.moreno at ecmanaged.com> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y devscripts python-all-dev python-stdeb rng-tools git vim | |
rngd -r /dev/urandom | |
adduser newuser | |
getent group ecmanaged >/dev/null || groupadd -r ecmanaged | |
getent passwd ecmanaged >/dev/null || useradd -r -g ecmanaged -d /opt/ecmanaged -s /usr/sbin/nologin -c "account for running ecagent" ecmanaged | |
su - newuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") |
OlderNewer