Commit 85b46acf authored by Martin Klimeš's avatar Martin Klimeš ❄️
Browse files

add return code check for system

parent e088913f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -176,6 +176,9 @@ sub install_printer {
    }
    }


    system($command);
    system($command);
    if ($? != 0) {
        die "[ERROR] Could not install the printer via lpadmin";
    }


    return;
    return;
}
}
@@ -188,6 +191,9 @@ sub update_ppd {
    -P "ppds/${printer_name}.ppd" );
    -P "ppds/${printer_name}.ppd" );


    system($command);
    system($command);
    if ($? != 0) {
        die "[ERROR] Could not update the ppd via lpadmin";
    }


    return;
    return;
}
}