Browse Source

shellcheck typo

typo for #32
pull/49/head
azlux 6 years ago
parent
commit
e439c5ffdd
3 changed files with 5 additions and 5 deletions
  1. +1
    -1
      install.sh
  2. +3
    -3
      log2ram
  3. +1
    -1
      uninstall.sh

+ 1
- 1
install.sh View File

@@ -3,7 +3,7 @@
[ -d /var/hdd.log ] && echo "ERROR: log2ram still installed. Uninstall first!" [ -d /var/hdd.log ] && echo "ERROR: log2ram still installed. Uninstall first!"
[ -d /var/hdd.log ] && exit 1 [ -d /var/hdd.log ] && exit 1


if [ `id -u` -eq 0 ]
if [ $(id -u) -eq 0 ]
then then
cp log2ram.service /etc/systemd/system/log2ram.service cp log2ram.service /etc/systemd/system/log2ram.service
chmod 644 /etc/systemd/system/log2ram.service chmod 644 /etc/systemd/system/log2ram.service


+ 3
- 3
log2ram View File

@@ -27,7 +27,7 @@ syncToDisk () {
syncFromDisk () { syncFromDisk () {
isSafe isSafe


if [ ! -z `du -sh -t $SIZE $HDD_LOG/ | cut -f1` ]; then
if [ ! -z "$(du -sh -t "$SIZE" $HDD_LOG/ | cut -f1)" ]; then
echo "ERROR: RAM disk too small. Can't sync." echo "ERROR: RAM disk too small. Can't sync."
umount -l $RAM_LOG/ umount -l $RAM_LOG/
umount -l $HDD_LOG/ umount -l $HDD_LOG/
@@ -45,7 +45,7 @@ syncFromDisk () {
} }


wait_for () { wait_for () {
while ! grep -qs $1 /proc/mounts; do
while ! grep -qs "$1" /proc/mounts; do
sleep 0.1 sleep 0.1
done done
} }
@@ -56,7 +56,7 @@ case "$1" in
mount --bind $RAM_LOG/ $HDD_LOG/ mount --bind $RAM_LOG/ $HDD_LOG/
mount --make-private $HDD_LOG/ mount --make-private $HDD_LOG/
wait_for $HDD_LOG wait_for $HDD_LOG
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=$SIZE log2ram $RAM_LOG/
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size="$SIZE" log2ram $RAM_LOG/
wait_for $RAM_LOG wait_for $RAM_LOG
syncFromDisk syncFromDisk
;; ;;


+ 1
- 1
uninstall.sh View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh


if [ `id -u` -eq 0 ]
if [ $(id -u) -eq 0 ]
then then
service log2ram stop service log2ram stop
systemctl disable log2ram systemctl disable log2ram


Loading…
Cancel
Save