View | Details | Raw Unified | Return to bug 202367 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/byobu/files/patch-usr_lib_byobu_battery (+29 lines)
Line 0 Link Here
1
--- usr/lib/byobu/battery.orig	2016-09-15 19:22:48 UTC
2
+++ usr/lib/byobu/battery
3
@@ -22,7 +22,7 @@
4
 
5
 __battery_detail() {
6
 	local bat
7
-	for bat in /proc/acpi/battery/*; do
8
+	for bat in /compat/linux/proc/acpi/battery/*; do
9
 		cat "$bat/info"
10
 		cat "$bat/state"
11
 	done
12
@@ -33,7 +33,7 @@ __battery() {
13
 	local bat line present sign state percent full rem color bcolor
14
 	# Linux support
15
 	present=""; full="0"; rem="0"; state=""
16
-	for bat in $BATTERY /sys/class/power_supply/* /proc/acpi/battery/*; do
17
+	for bat in $BATTERY /sys/class/power_supply/* /compat/linux/proc/acpi/battery/*; do
18
 		case "$bat" in
19
 			/sys/*)
20
 				if [ -r "$bat/uevent" ]; then
21
@@ -51,7 +51,7 @@ __battery() {
22
 					[ "$POWER_SUPPLY_STATUS" != "Unknown" ] && state="$POWER_SUPPLY_STATUS"
23
 				fi
24
 			;;
25
-			/proc/*)
26
+			/compat/linux/proc/*)
27
 				[ -f "$bat/info" ] || continue
28
 				while read line; do
29
 					set -- ${line}
(-)sysutils/byobu/files/patch-usr_lib_byobu_cpu__count (+17 lines)
Line 0 Link Here
1
--- usr/lib/byobu/cpu_count.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/cpu_count
3
@@ -20,12 +20,12 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __cpu_count_detail() {
7
-	grep -i "^model name" /proc/cpuinfo
8
+	grep -i "^model name" /compat/linux/proc/cpuinfo
9
 }
10
 
11
 __cpu_count() {
12
 	local c
13
-	c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
14
+	c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /compat/linux/proc/cpuinfo)
15
 	[ "$c" = "1" ] || printf "%sx" "$c"
16
 }
17
 
(-)sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq (+30 lines)
Line 0 Link Here
1
--- usr/lib/byobu/cpu_freq.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/cpu_freq
3
@@ -20,7 +20,7 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __cpu_freq_detail() {
7
-	cat /proc/cpuinfo
8
+	cat /compat/linux/proc/cpuinfo
9
 }
10
 
11
 __cpu_freq() {
12
@@ -29,13 +29,13 @@ __cpu_freq() {
13
 		read hz < /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
14
 		fpdiv $hz "1000000" 1 # 1Ghz
15
 		freq="$_RET"
16
-	elif [ -r "/proc/cpuinfo" ]; then
17
-		if egrep -q -s -i -m 1 "^cpu MHz|^clock" /proc/cpuinfo; then
18
-			freq=$(egrep -i -m 1 "^cpu MHz|^clock" /proc/cpuinfo | awk -F"[:.]" '{ printf "%01.1f", $2 / 1000 }')
19
+	elif [ -r "/compat/linux/proc/cpuinfo" ]; then
20
+		if egrep -q -s -i -m 1 "^cpu MHz|^clock" /compat/linux/proc/cpuinfo; then
21
+			freq=$(egrep -i -m 1 "^cpu MHz|^clock" /compat/linux/proc/cpuinfo | awk -F"[:.]" '{ printf "%01.1f", $2 / 1000 }')
22
 		else
23
 			# Must scale frequency by number of processors, if counting bogomips
24
-			count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
25
-			freq=$(egrep -i -m 1 "^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ print $2 }')
26
+			count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /compat/linux/proc/cpuinfo)
27
+			freq=$(egrep -i -m 1 "^bogomips" /compat/linux/proc/cpuinfo | awk -F"[:.]" '{ print $2 }')
28
 			freq=$(printf "%s %s" "$freq" "$count" | awk '{printf "%01.1f\n", $1/$2/1000}')
29
 		fi
30
 	elif hz=$(sysctl -n hw.cpufrequency 2>/dev/null); then
(-)sysutils/byobu/files/patch-usr_lib_byobu_cpu__temp (+20 lines)
Line 0 Link Here
1
--- usr/lib/byobu/cpu_temp.orig	2016-07-29 16:53:37 UTC
2
+++ usr/lib/byobu/cpu_temp
3
@@ -21,7 +21,7 @@
4
 
5
 __cpu_temp_detail() {
6
 	local i
7
-	for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
8
+	for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /compat/linux/proc/acpi/ibm/thermal /compat/linux/proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
9
 		[ -r "$i" ] || continue
10
 		printf "%s\n" "$i:"
11
 		cat "$i"/*
12
@@ -30,7 +30,7 @@ __cpu_temp_detail() {
13
 
14
 __cpu_temp() {
15
 	local i t unit
16
-	for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
17
+	for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /compat/linux/proc/acpi/ibm/thermal /compat/linux/proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
18
 		case "$i" in
19
 			*temp*_input|*thermal_zone*/temp)
20
 				[ -s "$i" ] && read t < "$i" && t=$(($t/1000))
(-)sysutils/byobu/files/patch-usr_lib_byobu_disk (+25 lines)
Line 0 Link Here
1
--- usr/lib/byobu/disk.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/disk
3
@@ -20,7 +20,7 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __disk_detail() {
7
-	df -h -P
8
+	df -h
9
 }
10
 
11
 __disk() {
12
@@ -28,11 +28,11 @@ __disk() {
13
 	# Default to /, but let users override
14
 	[ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK"
15
 	case $MP in
16
-		/dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);;
17
+		/dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /compat/linux/proc/mounts);;
18
 	esac
19
 	# this could be done faster with 'stat --file-system --format'
20
 	# but then we'd have to do blocks -> human units ourselves
21
-	out=$({ df -h -P "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }')
22
+	out=$({ df -h "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }')
23
 	set -- ${out}
24
 	size=${1}; pct=${2};
25
 	unit=${size#${size%?}} # get the unit (last char)
(-)sysutils/byobu/files/patch-usr_lib_byobu_ec2__cost (+22 lines)
Line 0 Link Here
1
--- usr/lib/byobu/ec2_cost.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/ec2_cost
3
@@ -56,8 +56,8 @@ __ec2_cost() {
4
 	file_to_stat="/etc/hostname"
5
 	hours=$(((`date +%s` - `stat --printf %Y $file_to_stat`) / 60 / 60 + 1))
6
 	# Auto detect network interface
7
-	[ -r "/proc/net/route" ] || return
8
-	interface=$(tail -n1 /proc/net/route  | awk '{print $1}')
9
+	[ -r "/compat/linux/proc/net/route" ] || return
10
+	interface=$(tail -n1 /compat/linux/proc/net/route  | awk '{print $1}')
11
 	local iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed
12
 	while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do
13
 		case "$iface" in
14
@@ -78,7 +78,7 @@ __ec2_cost() {
15
 			rx_gb=${rbytes}
16
 			break
17
 		fi
18
-	done < /proc/net/dev
19
+	done < /compat/linux/proc/net/dev
20
 	tx_gb=$(printf "%s" ${tx_gb} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
21
 	rx_gb=$(printf "%s" ${rx_gb} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
22
 	network_cost=`printf "%s %s %s %s" "$tx_gb" "$TX_RATE" "$rx_gb" "$RX_RATE" | awk '{printf "%f %f", $1*$2, $3*$4}' | awk '{printf "%f", $1 + $2}'`
(-)sysutils/byobu/files/patch-usr_lib_byobu_entropy (+18 lines)
Line 0 Link Here
1
--- usr/lib/byobu/entropy.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/entropy
3
@@ -19,12 +19,12 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __entropy_detail() {
7
-	cat /proc/sys/kernel/random/entropy_avail 2>/dev/null
8
+	cat /compat/linux/proc/sys/kernel/random/entropy_avail 2>/dev/null
9
 }
10
 
11
 __entropy() {
12
-	if [ -r /proc/sys/kernel/random/entropy_avail ]; then
13
-		local e=$(cat /proc/sys/kernel/random/entropy_avail)
14
+	if [ -r /compat/linux/proc/sys/kernel/random/entropy_avail ]; then
15
+		local e=$(cat /compat/linux/proc/sys/kernel/random/entropy_avail)
16
 		[ -n "$e" ] || return
17
 		color K Y; printf "e%s" "$e"; color --
18
 	fi
(-)sysutils/byobu/files/patch-usr_lib_byobu_fan__speed (+14 lines)
Line 0 Link Here
1
--- usr/lib/byobu/fan_speed.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/fan_speed
3
@@ -38,9 +38,9 @@ __fan_speed() {
4
 	done
5
 
6
 	# But others (e.g. Dell Inspirons) seem to be here:
7
-	if [ -r /proc/i8k ]; then
8
+	if [ -r /compat/linux/proc/i8k ]; then
9
 		local line=""
10
-		read line < /proc/i8k
11
+		read line < /compat/linux/proc/i8k
12
 		set -- $line
13
 		for speed in $7 $8; do
14
 			if [ -n "$speed" ] && [ "$speed" -gt 0 ]; then
(-)sysutils/byobu/files/patch-usr_lib_byobu_ip__address (+11 lines)
Line 0 Link Here
1
--- usr/lib/byobu/ip_address.orig	2016-09-15 19:22:48 UTC
2
+++ usr/lib/byobu/ip_address
3
@@ -34,7 +34,7 @@ __ip_address() {
4
 		interface="$MONITORED_NETWORK"
5
 	else
6
 		case "$IPV6" in
7
-			1|true|yes) interface=$(awk '$10 != "lo" { iface=$10 ; }; END { print iface; }' /proc/net/ipv6_route);;
8
+			1|true|yes) interface=$(awk '$10 != "lo" { iface=$10 ; }; END { print iface; }' /compat/linux/proc/net/ipv6_route);;
9
 			*) get_network_interface; interface="$_RET";;
10
 		esac
11
 	fi
(-)sysutils/byobu/files/patch-usr_lib_byobu_load__average (+18 lines)
Line 0 Link Here
1
--- usr/lib/byobu/load_average.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/load_average
3
@@ -20,12 +20,12 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __load_average_detail() {
7
-	cat /proc/loadavg
8
+	cat /compat/linux/proc/loadavg
9
 }
10
 
11
 __load_average() {
12
-	if [ -r "/proc/loadavg" ]; then
13
-		read one five fifteen other < /proc/loadavg
14
+	if [ -r "/compat/linux/proc/loadavg" ]; then
15
+		read one five fifteen other < /compat/linux/proc/loadavg
16
 	else
17
 		one=$(uptime | sed -e "s/.*://" | awk '{print $1}')
18
 	fi
(-)sysutils/byobu/files/patch-usr_lib_byobu_memory (+20 lines)
Line 0 Link Here
1
--- usr/lib/byobu/memory.orig	2016-09-15 19:22:48 UTC
2
+++ usr/lib/byobu/memory
3
@@ -26,7 +26,7 @@ __memory_detail() {
4
 __memory() {
5
 	local free="" total="" buffers="" cached=""
6
 	local kb_main_used=0 buffers_plus_cached=0 fo_buffers=0 fo_cached=0
7
-	if [ -r /proc/meminfo ]; then
8
+	if [ -r /compat/linux/proc/meminfo ]; then
9
 		while read tok val unit; do
10
 			case "$tok" in
11
 				MemTotal:) total=${val};;
12
@@ -35,7 +35,7 @@ __memory() {
13
 				Cached:) cached=${val};;
14
 			esac
15
 			[ -n "${free}" -a -n "${total}" -a -n "${buffers}" -a -n "${cached}" ] && break;
16
-		done < /proc/meminfo
17
+		done < /compat/linux/proc/meminfo
18
 	elif eval $BYOBU_TEST vm_stat >/dev/null 2>&1; then
19
 		# MacOS support
20
 		# calculation borrowed from http://apple.stackexchange.com/a/48195/18857
(-)sysutils/byobu/files/patch-usr_lib_byobu_network (+11 lines)
Line 0 Link Here
1
--- usr/lib/byobu/network.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/network
3
@@ -41,7 +41,7 @@ __network() {
4
 		cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/network.$i"
5
 		[ -r "$cache" ] && read x1 < "$cache" || tx1=0
6
 		local iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed
7
-		cat /proc/net/dev > "$cache".dev
8
+		cat /compat/linux/proc/net/dev > "$cache".dev
9
 		while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do
10
 			case "$iface" in
11
 				${interface}:)
(-)sysutils/byobu/files/patch-usr_lib_byobu_processes (+13 lines)
Line 0 Link Here
1
--- usr/lib/byobu/processes.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/processes
3
@@ -25,8 +25,8 @@ __processes_detail() {
4
 
5
 __processes() {
6
 	local count=
7
-	if [ -r /proc ]; then
8
-		count=$(ls -d /proc/[0-9]* 2>/dev/null| wc -l)
9
+	if [ -r /compat/linux/proc ]; then
10
+		count=$(ls -d /compat/linux/proc/[0-9]* 2>/dev/null| wc -l)
11
 	else
12
 		count=$(ps -ef | wc -l | awk '{print $1}')
13
 	fi
(-)sysutils/byobu/files/patch-usr_lib_byobu_raid (+20 lines)
Line 0 Link Here
1
--- usr/lib/byobu/raid.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/raid
3
@@ -20,7 +20,7 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __raid_detail() {
7
-	[ -r /proc/mdstat ] && cat /proc/mdstat || true
8
+	[ -r /compat/linux/proc/mdstat ] && cat /compat/linux/proc/mdstat || true
9
 }
10
 
11
 __raid() {
12
@@ -37,7 +37,7 @@ __raid() {
13
 				msg="$msg,$p"
14
 			;;
15
 		esac
16
-	done < /proc/mdstat
17
+	done < /compat/linux/proc/mdstat
18
 	if [ -n "$msg" ]; then
19
 		color B w r; printf "%s" "$msg"; color --
20
 	elif [ -e "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/raid" ]; then
(-)sysutils/byobu/files/patch-usr_lib_byobu_rcs__cost (+22 lines)
Line 0 Link Here
1
--- usr/lib/byobu/rcs_cost.orig	2016-01-14 12:15:11 UTC
2
+++ usr/lib/byobu/rcs_cost
3
@@ -40,7 +40,7 @@ __rcs_cost() {
4
 	# 15872MB       $0.960/h
5
 
6
 	# Instance memory
7
-	memory=`grep "^MemTotal:" /proc/meminfo | awk '{print $2}'`
8
+	memory=`grep "^MemTotal:" /compat/linux/proc/meminfo | awk '{print $2}'`
9
 
10
 	# Round memory down to the nearest multiple of 64MB
11
 	memory=$((${memory} - (${memory} % (64 * 1024))))
12
@@ -59,8 +59,8 @@ __rcs_cost() {
13
 	TX_RATE="0.22"
14
 
15
 	# Auto detect network interface
16
-	[ -r "/proc/net/route" ] || return
17
-	IF=$(tail -n1 /proc/net/route  | awk '{print $1}')
18
+	[ -r "/compat/linux/proc/net/route" ] || return
19
+	IF=$(tail -n1 /compat/linux/proc/net/route  | awk '{print $1}')
20
 
21
 	ifconfig_out=`LC_ALL=C /sbin/ifconfig "$IF"`
22
 
(-)sysutils/byobu/files/patch-usr_lib_byobu_reboot__required (+11 lines)
Line 0 Link Here
1
--- usr/lib/byobu/reboot_required.orig	2016-06-13 11:26:23 UTC
2
+++ usr/lib/byobu/reboot_required
3
@@ -46,7 +46,7 @@ __reboot_required() {
4
 				break
5
 			;;
6
 		esac
7
-	done < /proc/modules
8
+	done < /compat/linux/proc/modules
9
 	if [ -e "$REBOOT_FLAG" ]; then
10
 		if [ "$livepatched" = "1" ]; then
11
 			color k G; printf "$ICON_REBOOT"; color --;
(-)sysutils/byobu/files/patch-usr_lib_byobu_swap (+20 lines)
Line 0 Link Here
1
--- usr/lib/byobu/swap.orig	2016-04-07 22:05:52 UTC
2
+++ usr/lib/byobu/swap
3
@@ -20,7 +20,7 @@
4
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
 
6
 __swap_detail() {
7
-	cat /proc/meminfo
8
+	cat /compat/linux/proc/meminfo
9
 }
10
 
11
 __swap() {
12
@@ -34,7 +34,7 @@ __swap() {
13
 			continue
14
 		fi
15
 		[ -n "$stotal" -a -n "$sfree" ] && break;
16
-	done < /proc/meminfo
17
+	done < /compat/linux/proc/meminfo
18
 	if [ "${stotal:-0}" = "0" ]; then
19
 		printf ""
20
 		rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/swap"
(-)sysutils/byobu/files/patch-usr_lib_byobu_uptime (+13 lines)
Line 0 Link Here
1
--- usr/lib/byobu/uptime.orig	2016-05-31 14:48:13 UTC
2
+++ usr/lib/byobu/uptime
3
@@ -27,8 +27,8 @@ __uptime_detail() {
4
 
5
 __uptime() {
6
 	local u= idle= str=
7
-	if [ -r /proc/uptime ]; then
8
-		read u idle < /proc/uptime
9
+	if [ -r /compat/linux/proc/uptime ]; then
10
+		read u idle < /compat/linux/proc/uptime
11
 		u=${u%.*}
12
 	elif [ -x /usr/sbin/sysctl ]; then
13
 		# MacOS support
(-)sysutils/byobu/pkg-message (+14 lines)
Line 0 Link Here
1
======================================================================
2
3
byobu requires linprocfs(5) mounted on /compat/linux/proc
4
5
If you have not done it yet, please do the following:
6
7
	mkdir -p /compat/linux/proc
8
	mount -t linprocfs linproc /compat/linux/proc
9
10
To make it permanent, you need the following line in /etc/fstab:
11
12
	linproc  /compat/linux/proc  linprocfs  rw,late  0 0
13
14
======================================================================

Return to bug 202367